Question d’entretien chez Google

Recursive Matrix question and a two pointer question