Google interview question

Leetcode medium questions on trees and arrays