Aptiv interview question

Recursive and stack