### LeetCode题解

LeetCode题目思路解析

6 已关注
53篇博文
• #### LeetCode 287. Find the Duplicate Number

Find the Duplicate Number 题目描述: Given an array nums containing n + 1 integers where each integer i...

2017-09-16 19:35
268
• #### LeetCode 203. Remove Linked List Elements

Remove Linked List Elements 题目描述: Remove all elements from a linked list of integers that have...

2017-09-17 20:50
169
• #### LeetCode 237. Delete Node in a Linked List

Delete Node in a Linked List 题目描述: Write a function to delete a node (except the tail) in a si...

2017-09-17 21:02
184
• #### LeetCode 206. Reverse Linked List

Reverse Linked List 题目思路: 将题目给出的链表反转。 使用中间变量将每个链表中元素的指向下一个元素的指针指向前一个元素即可。最后返回新的头指针节点。 题目代码: ...

2017-09-18 15:21
348
• #### LeetCode 83. Remove Duplicates from Sorted List

Remove Duplicates from Sorted List 题目描述: Given a sorted linked list, delete all duplicates suc...

2017-09-18 15:26
329
• #### LeetCode 21. Merge Two Sorted Lists

Merge Two Sorted Lists 题目思路: 题目要将两个排好序的链表合并。 我们新声明一个指针，表示合并后链表的头节点元素的指针，最后返回头节点指针即可。 我们再次声明一个指...

2017-09-18 15:30
333
• #### LeetCode 141. Linked List Cycle

Linked List Cycle 题目思路: 判断给定的链表中是否存在环。 参考这篇文章 题目代码: /** * Definition for singly-linked lis...

2017-09-18 15:36
339
• #### LeetCode 142. Linked List Cycle II

Linked List Cycle II 题目思路 判断给定链表中是否存在环，如果存在环返回环的起点。 参考这篇文章。 题目代码: /** * Definition for s...

2017-09-18 15:39
320
• #### LeetCode 234. Palindrome Linked List

Palindrome Linked List 题目描述: Given a singly linked list, determine if it is a palindrome. Follow u...

2017-09-19 11:42
319
• #### LeetCode 105. Construct Binary Tree from Preorder and Inorder Traversal

Construct Binary Tree from Preorder and Inorder Traversal 题目描述: Given preorder and inorder tra...

2017-09-13 14:33
309
• #### LeetCode 106. Construct Binary Tree from Inorder and Postorder Traversal

Construct Binary Tree from Inorder and Postorder Traversal 题目描述: Given inorder and postorder t...

2017-09-13 14:39
463
• #### LeetCode 153. Find Minimum in Rotated Sorted Array

Find Minimum in Rotated Sorted Array 题目描述: Suppose an array sorted in ascending order is rot...

2017-09-13 14:44
322
• #### LeetCode 162. Find Peak Element

Find Peak Element 题目描述: A peak element is an element that is greater than its neighbors. Gi...

2017-09-13 14:50
334
• #### LeetCode 667. Beautiful Arrangement II

Beautiful Arrangement II 题目描述: Given two integers n and k, you need to construct a list whi...

2017-09-12 09:27
458
• #### LeetCode 39. Combination Sum

Combination Sum 题目描述: Given a set of candidate numbers (C) (without duplicates) and a target n...

2017-09-12 09:32
215
• #### LeetCode 40. Combination Sum II

Combination Sum II 题目描述: Given a collection of candidate numbers (C) and a target number (T), ...

2017-09-12 09:39
189
• #### LeetCode 216. Combination Sum III

Combination Sum III 题目描述: Find all possible combinations of k numbers that add up to a number ...

2017-09-12 09:44
172
• #### LeetCode 11. Container With Most Water

Container With Most Water 题目描述: Given n non-negative integers a1, a2, ..., an, where each re...

2017-09-12 09:51
230
• #### LeetCode 674. Longest Continuous Increasing Subsequence

Longest Continuous Increasing Subsequence 题目描述: Given an unsorted array of integers, find the ...

2017-09-10 20:58
236
• #### LeetCode 15. 3Sum

3Sum 题目描述: Given an array S of n integers, are there elements a, b, c in S such that a + b + c...

2017-09-11 15:11
266