leetcode
文章平均质量分 82
utobe67
这个作者很懒,什么都没留下…
展开
-
leetcode 两道交换问题
41. First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should ru原创 2017-01-10 11:18:30 · 509 阅读 · 0 评论 -
leetcode 4. Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1:nums1 =原创 2017-03-12 13:25:56 · 293 阅读 · 0 评论 -
leetcode 146. LRU Cache 460. LFU Cache
146. LRU CacheDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.get(key) - Get the value (will always be po原创 2017-03-15 23:05:45 · 526 阅读 · 0 评论 -
leetcode 432. All O`one Data Structure
432. All O`one Data StructureImplement a data structure supporting the following operations:Inc(Key) - Inserts a new key with value 1. Or increments an existing key by 1. Key is guarante原创 2017-03-26 11:14:45 · 584 阅读 · 0 评论