The wording in this question is wrong.

  • 0

    The question is worded "Calling next() will return the next smallest number in the BST."
    If that were true, shouldn't the iterator return the greatest number first and return the next greatest with next()?
    It should be worded "Calling next() will return the next greatest number in the BST."

  • 0

    Isn't it like "next best", which is "not as good as the best but is better than all others"? Would you call that "next worst" instead?

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.