![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode
文章平均质量分 70
vinllen
新博客地址:vinllen.com
展开
-
Leetcode LRU Cache
题目:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of th原创 2014-09-18 13:24:14 · 620 阅读 · 0 评论 -
Leetcode Simplify Path
题目:Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"Corner Cases:Did you consider the case wh原创 2014-10-17 21:57:45 · 707 阅读 · 0 评论 -
Leetcode Merge k Sorted Lists
题目:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.解题:维持一个xiaodin原创 2014-10-17 18:42:02 · 622 阅读 · 0 评论 -
Leetcode Anagrams
题目:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.解题:这题态原创 2014-10-10 22:56:19 · 591 阅读 · 0 评论 -
Leetcode ump Game II
题目:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Yo原创 2014-10-10 22:39:20 · 630 阅读 · 0 评论 -
Leetcode Combination Sum II
题目:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in C may only be used once in th原创 2014-10-10 21:45:15 · 568 阅读 · 0 评论 -
Leetcode Reverse Nodes in k-Group
题目:Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain原创 2014-10-10 14:19:29 · 594 阅读 · 0 评论 -
Leetcode Combination Sum
题目:Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from C unlim原创 2014-10-08 19:28:02 · 529 阅读 · 0 评论 -
Leetcode Palindrome Partitioning
题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example, given s = "aab",Return原创 2014-10-08 21:55:54 · 594 阅读 · 0 评论 -
Leetcode Palindrome Partitioning II
题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.For example, given s = "aa原创 2014-10-08 22:22:25 · 565 阅读 · 0 评论 -
Leetcode Maximum Product Subarray
题目:Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the原创 2014-10-21 22:34:04 · 662 阅读 · 0 评论 -
Leetcode Unique Paths II
题目:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively原创 2014-09-20 16:40:08 · 641 阅读 · 0 评论 -
Leetcode Trapping Rain Water
题目:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3原创 2014-09-20 13:16:59 · 556 阅读 · 0 评论 -
Leetcode Find Peak Element
原题:A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple pea原创 2014-12-16 20:38:47 · 751 阅读 · 0 评论