Microsoft Interview Question

Question 1: BST, Question 2: DP, Question 3: Sliding Window