Google DeepMind Interview Question

- DP, recursion etc