BNY interview question

Hackerrank/code pair consisted of leetcode easy-medium questions.