代码改变世界

随笔档案-2019年06月

[LeetCode] 239. Sliding Window Maximum_Hard tag: deque

2019-06-26 11:03 by Johnson_强生仔仔, 190 阅读, 收藏, 编辑
摘要: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k num 阅读全文

[LeetCode] 295. Find Median from Data Stream_hard tag: Heap Need to update the follow up question?

2019-06-13 09:49 by Johnson_强生仔仔, 208 阅读, 收藏, 编辑
摘要: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文

[LeetCode] 407. Trapping Rain Water II_hard tag: Heap

2019-06-12 10:05 by Johnson_强生仔仔, 237 阅读, 收藏, 编辑
摘要: Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to 阅读全文

[LeetCode] 16. 3Sum Closest_Medium tag: Array, Two pointers

2019-06-05 12:00 by Johnson_强生仔仔, 173 阅读, 收藏, 编辑
摘要: Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the thr 阅读全文
点击右上角即可分享
微信分享提示