Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Hmm, okay, does that mean that the new destructor will avoid worst-case O(n) recursive calls? But to me it seems like it will incur additional time complexity costs in having to find the inorder successor each time.
Thank you for your excellent pointers! (heh) I'm still a little confused on your destructor -- how does having a custom destructor avoid the worst-case scenario of a bst degenerating into a linked list?
That being said, in the gameLoop function, you just use newHangman <- get -- is it getting the state from val <- guess newGuess even though nothing is explicitly put? I couldn't figure this out by looking at simply the docs...