Google Interview Question

Recursive Matrix question and a two pointer question