JOOR interview question

Recursion algorithms and talking through solutions on the spot.