Buggy Code
This algorithm has a bug in it.
(Spoiler Alert: Solution below)
This is the same pseudocode with the bug removed
Did I miss any bugs?
For further actions, you may consider blocking this person and/or reporting abuse
Shubham Sourabh -
Serhii Korol -
Basti Ortiz -
Frank -
Top comments (2)
Did you miss any bugs? Yes, the question count is undefined. For it to work in your code it needs to start at zero, otherwise the length of the game is indeterminate and possibly infinite :)
I actually just fixed this in the actual blog post yesterday. Good eye!