TweakCode
Recursion lessons
Loading editor…
Test casesRun to compare output
Input
ops = ["MapSum","insert","sum","insert","sum"], args = [[],["apple",3],["ap"],["app",2],["ap"]]
Output
—
Expected
[null,null,3,null,5]

More practice

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