Sollicitatievraag bij Anduril

Recursion question that could be found on leetcode