Skip to main content
gust's user avatar
gust's user avatar
gust's user avatar
gust
  • Member for 4 years, 10 months
  • Last seen more than a month ago
awarded
awarded
awarded
comment
Python leetcode: scheduling courses to meet prerequisite requirements
This is great, thank you for the suggestions!
Loading…
awarded
awarded
Loading…
comment
Using smart pointers to construct Binary Search Tree
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.
comment
Using smart pointers to construct Binary Search Tree
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?
Loading…
accepted
comment
Removing OO style coding from Haskell
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...
comment
Removing OO style coding from Haskell
Thank you, this is amazing! So much cleaner code to read!
asked
Loading…
awarded
comment
2 player CLI Tic-Tac-Toe game in python
Saying valid=lambda x:True will always run if valid(user_input). Try running your code with wrong inputs. You will never print invalid_message.