Day: May 7, 2020

[LeetCode] 239. Sliding Window Maximum

Solution There are several approaches to solve this problem, like sliding window or DP. A more general description of this…

[LeetCode] 968. Binary Tree Cameras

Solution This problem can be reduced to Minimum Dominating Set problem in Trees. Find minimum set of vertices such that…

[LeetCode] 644. Maximum Average Subarray II

Solution Since the average must be> = the smallest element in the array, and <= the largest element in the…