Amazon interview question

Two questions were asked in the interview based on binary tree and sliding window problem