TweakCode
Recursion lessons
Loading editor…
Test casesRun to compare output
Input
tasks = ["A","A","A","B","B","B"], n = 2
Output
—
Expected
8

More practice

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