HCLTech Interview Question

recursion question and array related question