TweakCode
Recursion lessons
Loading editor…
Test casesRun to compare output
Input
ops = ["BSTIterator","next","next","hasNext","next","hasNext","next","hasNext","next","hasNext"], args = [[[7,3,15,null,null,9,20]],[],[],[],[],[],[],[],[],[]]
Output
—
Expected
[null,3,7,true,9,true,15,true,20,false]

More practice

Same technique, different problems. Try them without the walkthrough.