Google DeepMind interview question

- DP, recursion etc