Nagarro interview question

Some arrays questions Some questions based on recursion and dynamic programming