LeetCode
Biglethz
这个作者很懒,什么都没留下…
展开
-
5. Longest Palindromic Substring
leetcode原创 2017-09-07 23:42:18 · 196 阅读 · 0 评论 -
24.Swap Nodes in Pairs
题目 Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only...原创 2018-04-03 21:26:51 · 162 阅读 · 0 评论 -
15. 3Sum
题目Given an array S of n integers, arethere elements a, b, c in S such that a + b + c = 0? Find allunique triplets in the array which gives the sum of zero.Note: The solution setmust not contain duplica原创 2018-04-15 21:39:56 · 193 阅读 · 0 评论 -
26. Remove Duplicates from Sorted Array
题目 Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this by mod...原创 2018-04-15 21:33:44 · 159 阅读 · 0 评论 -
22. Generate Parentheses
题目Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ “((()))”, “(()())”, “(())()”, “()(())”原创 2018-04-15 21:16:10 · 184 阅读 · 0 评论 -
19. Remove Nth Node From End of List
题目 Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the ...原创 2018-03-26 23:13:46 · 122 阅读 · 0 评论 -
59. Spiral Matrix II
Spiral Matrix II原创 2017-09-20 22:52:34 · 280 阅读 · 0 评论 -
664. Strange Printer
Strange Printer原创 2017-09-20 00:07:45 · 482 阅读 · 0 评论 -
LeetCode- 15. 3Sum
Given an array S of n integers, arethere elements a, b, c in S such that a + b + c = 0? Find allunique triplets in the array which gives the sum of zero. Note: The solution setmust not contain原创 2017-08-24 00:38:28 · 188 阅读 · 0 评论 -
33. Search in Rotated Sorted Array
题目 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given a target value to search. If fo...原创 2018-06-07 22:11:14 · 222 阅读 · 2 评论