Pergunta de entrevista da empresa Navan

similar to pascal triangle with recursion and optimization