摘要: 题目连接https://leetcode.com/problems/lru-cache/LRU CacheDescriptionDesign and implement a data structure for Least Recently Used (LRU) cache. It should s... 阅读全文
posted @ 2015-12-11 21:30 GadyPu 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/3sum/3SumDescriptionGiven an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find al... 阅读全文
posted @ 2015-12-11 21:15 GadyPu 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/letter-combinations-of-a-phone-number/Letter Combinations of a Phone NumberDescriptionGiven a digit string, return a... 阅读全文
posted @ 2015-12-11 21:08 GadyPu 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/remove-nth-node-from-end-of-list/Remove Nth Node From End of ListDescriptionGiven a linked list, remove the $n^{th}$... 阅读全文
posted @ 2015-12-11 21:05 GadyPu 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/valid-parentheses/Valid ParenthesesDescriptionGiven a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ ... 阅读全文
posted @ 2015-12-11 21:02 GadyPu 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/merge-k-sorted-lists/Merge k Sorted ListsDescriptionMerge k sorted linked lists and return it as one sorted list. An... 阅读全文
posted @ 2015-12-11 20:58 GadyPu 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/remove-element/Remove ElementDescriptionGiven an array and a value, remove all instances of that value in place and ... 阅读全文
posted @ 2015-12-11 20:55 GadyPu 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/implement-strstr/Implement strStr()DescriptionImplement strStr().Returns the index of the first occurrence of needle... 阅读全文
posted @ 2015-12-11 20:53 GadyPu 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/longest-valid-parentheses/Longest Valid ParenthesesDescriptionGiven a string containing just the characters ‘(’ and ... 阅读全文
posted @ 2015-12-11 20:47 GadyPu 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/valid-sudoku/Valid SudokuDescriptionDetermine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudo... 阅读全文
posted @ 2015-12-11 20:44 GadyPu 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/sudoku-solver/Sudoku SolverDescriptionWrite a program to solve a Sudoku puzzle by filling the empty cells.Empty cell... 阅读全文
posted @ 2015-12-11 20:39 GadyPu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/count-and-say/Count and SayDescriptionThe count-and-say sequence is the sequence of integers beginning as follows:1,... 阅读全文
posted @ 2015-12-11 20:34 GadyPu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/multiply-strings/Multiply StringsDescriptionGiven two numbers represented as strings, return multiplication of the n... 阅读全文
posted @ 2015-12-11 20:26 GadyPu 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/anagrams/Group AnagramsDescriptionGiven an array of strings, group anagrams together.For example, given: [“eat”, “te... 阅读全文
posted @ 2015-12-11 20:21 GadyPu 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/spiral-matrix/Spiral MatrixDescriptionGiven a matrix of m x n elements (m rows, n columns), return all elements of t... 阅读全文
posted @ 2015-12-11 20:15 GadyPu 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目连接https://leetcode.com/problems/length-of-last-word/Length of Last WordDescriptionGiven a string s consists of upper/lower-case alphabets and empty ... 阅读全文
posted @ 2015-12-11 20:12 GadyPu 阅读(200) 评论(0) 推荐(0) 编辑