
数组
HuangHongkai_
这个作者很懒,什么都没留下…
展开
-
LeetCode41. First Missing Positive (数组技巧)
Given an unsorted integer array, find the smallest missing positive integer.Example 1:Input: [1,2,0]Output: 3Example 2:Input: [3,4,-1,1]Output: 2Example 3:Input: [7,8,9,11,12]Output: 1Not...原创 2018-11-03 11:11:09 · 161 阅读 · 0 评论 -
LeetCode719. Find K-th Smallest Pair Distance (二分法,滑动窗口优化)
Given an integer array, return the k-th smallest distance among all the pairs. The distance of a pair (A, B) is defined as the absolute difference between A and B.Example 1:Input:nums = [1,3,1]k =...原创 2018-11-03 16:31:49 · 229 阅读 · 0 评论