BNY interview question

1. Recursion, DP related questions and Java fundamentals