Domanda di colloquio di ByteDance

Algorithm question was related to recursion