Microsoft Interview Question

sliding window, greedy algorithm, DFS and BFS