Pregunta de entrevista de Chubb

one recursion question and one question of prefix sum/difference array topic