BNY interview question

3 leetcode easy - medium questions