Microsoft interview question

Explain recursion to a 5-year-old.

Interview Answer

Anonymous

Jul 16, 2022

To child: You go daily to play in the ground and take your toys one by one, that is you have to remember if you have forgot some toy, taking a lot of time and you are doing much more efforts to do that. Instead you could keep all those toys in one box and whenever you visit to ground you can directly take that box with you to play. That is recursion.