LC做题记录To Be Continued

2. Add Two Numbers - Medium   topics: linked list, math  solution

3. Longest Substring Without Repeating Characters - Medium   topics: hash table, two pointers, string, sliding window  solution

4. Median of Two Sorted Arrays - Hard   topics: array, binary search, divide and conquer  solution

7. Reverse Integer - Easy   topics: math  solution

17. Letter Combinations of a Phone Number - Medium   topics: string, backtracking  solution

19. Remove Nth Node From End of List - Medium   topics: linked list, two pointers  solution

20. Valid Parentheses - Easy   topics: string, stack  solution

21. Merge Two Sorted Lists - Easy   topics: linked list  solution

22. Generate Parentheses - Medium   topics: string, backtracking  solution

23. Merge k Sorted Lists - Hard   topics: linked list, divide and conquer, heap  solution

26. Remove Duplicates from Sorted Array - Easy   topics: array, two pointers  solution

27. Remove Element - Easy   topics: array, two pointers  solution

34. Find First and Last Position of Element in Sorted Array - Medium  topics: binary search  solution 

35. Search Insert Position - Easy   topics: array, binary search  solution

39. Combination Sum - Medium   topics: array, backtracking  solution

40. Combination Sum II - Medium   topics: array, backtracking  solution

46. Permutations - Medium   topics: backtracking  solution

47. Permutations II - Medium   topics: backtracking  solution

50. Pow(x, n) - Medium  topics: math, binary search  solution

51. N-Queens - Hard   topics: backtracking  solution

52. N-Queens II - Hard   topics: backtracking  solution

74. Search a 2D Matrix - Medium  topics: array, binary search  solution

75. Sort Colors - Medium   topics: array, two pointers, sort  solution

77. Combinations - Medium   topics: backtracking  solution

78. Subsets - Medium   topics: array, backtracking, bit manipulation  solution

80. Remove Duplicates from Sorted Array II - Medium   topics: array, two pointers  solution

82. Remove Duplicates from Sorted List II - Medium   topics: linked list  solution

83. Remove Duplicates from Sorted List - Easy   topics: linked list  solution

86. Partition List - Medium   topics: linked list, two pointers  solution

90. Subsets II - Medium   topics: array, backtracking  solution

92. Reverse Linked List II - Medium   topics: linked list  solution

94. Binary Tree Inorder Traversal - Medium   topics: hash table, stack, tree  solution

98. Validate Binary Search Tree - Medium   topics: tree, dfs  solution

100. Same Tree - Easy   topics: tree, dfs  solution

101. Symmetric Tree - Easy   topics: tree, dfs, bfs  solution

102. Binary Tree Level Order Traversal - Medium   topics: tree, bfs  solution

107. Binary Tree Level Order Traversal II - Easy   topics: tree, bfs  solution

110. Balanced Binary Tree - Easy   topics: tree, dfs  solution

141. Linked List Cycle - Easy   topics: linked list, two pointers  solution

142. Linked List Cycle II - Medium   topics: linked list, two pointers  solution

143. Reorder List - Medium   topics: linked list  solution

144. Binary Tree Preorder Traversal - Medium   topics: stack, tree  solution

145. Binary Tree Postorder Traversal - Hard   topics: stack, tree  solution

147. Insertion Sort List - Medium   topics: linked list, sort  solution

148. Sort List - Medium   topics: linked list, sort  solution

151. Reverse Words in a String - Medium   topics: string  solution

155. Min Stack - Easy   topics: stack, design  solution

159. Longest Substring with At Most Two Distinct Characters - Hard   topics: hash table, two pointers, string, sliding window  solution

186. Reverse Words in a String II - Medium   topics: string  solution

189. Rotate Array - Easy   topics: array  solution

190. Reverse Bits - Easy   topics: bit manipulation  solution

191. Number of 1 Bits - Easy   topics: bit manipulation  solution

203. Remove Linked List Elements - Easy   topics: linked list  solution

206. Reverse Linked List - Easy   topics: linked list  solution

215. Kth Largest Element in an Array - Medium   topics: divide and conquer, heap  solution

216. Combination Sum III - Medium   topics: array, backtracking  solution

217. Contains Duplicate - Easy   topics: array, hash table  solution

219. Contains Duplicate II - Easy   topics: array, hash table  solution

225. Implement Stack using Queues - Easy   topics: stack, design  solution

226. Invert Binary Tree - Easy   topics: tree  solution

231. Power of Two - Easy   topics: math, bit manipulation  solution

232. Implement Queue using Stacks - Easy   topics: stack, design  solution

234. Palindrome Linked List - Easy   topics: linked list, two pointers  solution

235. Lowest Common Ancestor of a Binary Search Tree - Easy   topics: tree  solution

236. Lowest Common Ancestor of a Binary Tree - Medium   topics: tree  solution

237. Delete Node in a Linked List - Easy   topics: linked list  solution

240. Search a 2D Matrix II - Medium  topics: binary search, divide and conquer  solution

254. Factor Combinations - Medium   topics: backtracking  solution

268. Missing Number - Easy   topics: array, math, bit manipulation  solution

271. Encode and Decode Strings - Medium   topics: string  solution

316. Remove Duplicate Letters - Hard   topics: stack, greedy  solution

326. Power of Three - Easy   topics: math  solution

328. Odd Even Linked List - Medium   topics: linked list  solution

340. Longest Substring with At Most K Distinct Characters - Hard   topics: hash table, string, sliding window  solution

342. Power of Four - Easy   topics: bit manipulation  solution

344. Reverse String - Easy   topics: two pointers, string  solution

345. Reverse Vowels of a String - Easy   topics: two pointers, string  solution

346. Moving Average from Data Stream - Easy   topics: design, queue  solution

347. Top K Frequent Elements - Medium   topics: hash table, heap  solution

349. Intersection of Two Arrays - Easy   topics: hash table, two pointers, binary search, sort  solution

350. Intersection of Two Arrays II - Easy   topics: hash table, two pointers, binary search, sort  solution

355. Design Twitter - Medium   topics: hash table, heap, design  solution

373. Find K Pairs with Smallest Sums - Medium   topics: heap  solution

374. Guess Number Higher or Lower - Easy  topics: binary search  solution

378. Kth Smallest Element in a Sorted Matrix - Medium   topics: binary search, heap  solution

387. First Unique Character in a String - Easy   topics: hash table, string  solution

405. Convert a Number to Hexadecimal - Easy   topics: bit manipulation  solution

424. Longest Repeating Character Replacement - Medium   topics: two pointers, sliding window  solution

429. N-ary Tree Level Order Traversal - Easy   topics: tree, bfs  solution

438. Find All Anagrams in a String - Easy   topics: hash table  solution

443. String Compression - Easy   topics: string  solution

445. Add Two Numbers II - Medium   topics: linked list  solution

451. Sort Characters By Frequency - Medium   topics: hash table, heap  solution

461. Hamming Distance - Easy   topics: bit manipulation  solution

477. Total Hamming Distance - Medium   topics: bit manipulation  solution

485. Max Consecutive Ones - Easy   topics: array  solution

487. Max Consecutive Ones II - Medium   topics: two pointers  solution

509. Fibonacci Number - Easy  topics: array  solution

535. Encode and Decode TinyURL - Medium   topics: hash table, math  solution

541. Reverse String II - Easy   topics: string  solution

557. Reverse Words in a String III - Easy   topics: string  solution

567. Permutation in String - Medium   topics: two pointers, sliding window  solution

589. N-ary Tree Preorder Traversal - Easy   topics: tree  solution

590. N-ary Tree Postorder Traversal - Easy   topics: tree  solution

609. Find Duplicate File in System - Medium   topics: hash table, string  solution

658. Find K Closest Elements - Medium  topics: binary search  solution

692. Top K Frequent Words - Medium   topics: hash table, heap, trie  solution

700. Search in a Binary Search Tree - Easy   topics: tree  solution

702. Search in a Sorted Array of Unknown Size - Medium   topics: binary search  solution

703. Kth Largest Element in a Stream - Easy   topics: heap  solution

704. Binary Search - Easy  topics: binary search  solution

708. Insert into a Cyclic Sorted List - Medium   topics: linked list  solution

744. Find Smallest Letter Greater Than Target - Easy  topics: binary search  solution

784. Letter Case Permutation - Easy   topics: backtracking, bit manipulation  solution

785. Is Graph Bipartite? - Medium   topics: dfs, bfs, graph  solution

796. Rotate String - Easy   topics:   solution

833. Find And Replace in String - Medium   topics: string  solution

876. Middle of the Linked List - Easy   topics: linked list  solution

890. Find and Replace Pattern - Medium   topics: string  solution

912. Sort an Array - Medium   topics: sort  solution

916. Word Subsets - Medium   topics: string  solution

917. Reverse Only Letters - Easy   topics: string  solution

919. Complete Binary Tree Inserter - Medium   topics: tree  solution

958. Check Completeness of a Binary Tree - Medium   topics: tree  solution

973. K Closest Points to Origin - Medium   topics: divide and conquer, heap, sort  solution

992. Subarrays with K Different Integers - Hard   topics: hash table, two pointers, sliding window  solution

993. Cousins in Binary Tree - Easy   topics: tree, bfs  solution

1002. Find Common Characters - Easy   topics: array, hash table  solution

1004. Max Consecutive Ones III - Medium   topics: two pointers, sliding window  solution

1046. Last Stone Weight - Easy   topics: heap, greedy  solution

1047. Remove All Adjacent Duplicates In String - Easy   topics: stack  solution

1087. Brace Expansion - Medium   topics: backtracking  solution

1089. Duplicate Zeros - Easy   topics: array  solution

1100. Find K-Length Substrings With No Repeated Characters - Medium   topics: string, sliding window  solution

1119. Remove Vowels from a String - Easy   topics: string  solution

1128. Number of Equivalent Domino Pairs - Easy   topics: array  solution

1151. Minimum Swaps to Group All 1's Together - Medium   topics: array, sliding window  solution

solution to be updated:

54. Spiral Matrix - Medium  topics: array  solution

55. Jump Game - Medium  topics: array, greedy  solution

59. Spiral Matrix II - Medium  topics: array  solution

408. Valid Word Abbreviation - Easy  topics: string  solution

674. Longest Continuous Increasing Subsequence - Easy  topics: array  solution

1026. Maximum Difference Between Node and Ancestor - Medium  topics: tree, dfs  solution

原文地址:https://www.cnblogs.com/fatttcat/p/11087929.html