Verily Interview Question

Recursive problems leetcode medium to hard