这里记录一下本身刷的LeetCode题目。html
有些博客用英文阐述本身的思路和收获,至关于练习一下英文的表达能力。数组
比较好的题目有加粗。post
题目之后将按题型分类,能够从目录寻找相关的分类。 指针
简单题htm
26. Remove Duplicates from Sorted Arrayblog
122. Best Time to Buy and Sell Stock IIip
136. Single Number (思想很好)博客
350. Intersection of Two Arrays II
中等题
简单题
387. First Unique Character in a String
中等题
8. String to Integer (atoi) 溢出的处理
简单
中等
19. Remove Nth Node From End of List
简单
104. Maximum Depth of Binary Tree
中等
98. Validate Binary Search Tree(还行)
230. Kth Smallest Element in a BST
94. Binary Tree Inorder Traversal
144. Binary Tree Preorder Traversal
102. Binary Tree Level Order Traversal
困难
145. Binary Tree Postorder Traversal
利用双指针遍历数组、字符串等。
167. Two Sum II - Input array is sorted
345. Reverse Vowels of a String
3. Longest Substring Without Repeating Characters
5. Longest Palindromic Substring
151. Reverse Words in a String
157. Read N Characters Given Read4
158. Read N Characters Given Read4 II - Call multiple times
159. Longest Substring with At Most Two Distinct Characters
170. Two Sum III – Data structure design