Amazon interview question

Max Average subtree Find element in 2d sorted matrix