ISEE interview question

LeetCode medium based on Binary Tree and matrices