LeetCode
LeetCode copied to clipboard
Top Frequency: Top 10
- 314. Binary Tree Vertical Order Traversal [BFS]
- 1249. Minimum Remove to Make Valid Parentheses [Stack]
- :white_check_mark: 408. Valid Word Abbreviation
- 339. Nested List Weight Sum [⚠️复杂度分析]
- :white_check_mark: 1762. Buildings With an Ocean View
- 1650. Lowest Common Ancestor of a Binary Tree III
- 1570. Dot Product of Two Sparse Vectors
-
680. Valid Palindrome II
- 125. Valid Palindrome
-
1216. Valid Palindrome III [DP]
- :white_check_mark: 72. Edit Distance
-
516. Longest Palindromic Subsequence
- :white_check_mark: https://leetcode.com/problems/longest-palindromic-subsequence/editorial/
- :white_check_mark: 227. Basic Calculator II [+-*/]
- 528. Random Pick with Weight
Top Frequency: 11~20
- :white_check_mark: 215. Kth Largest Element in an Array
- :white_check_mark: 347. Top K Frequent Elements [PriorityQueue(Heap), Quick Select, Bucket sort]
- 703. Kth Largest Element in a Stream [PriorityQueue(minHeap)]
- 973. K Closest Points to Origin
- 71. Simplify Path [Deque, LinkedList, String.split(), Regular Expression]
- 791. Custom Sort String
- 938. Range Sum of BST
- 691. Stickers to Spell Word
- Lowest Common Ancestor
- 426. Convert Binary Search Tree to Sorted Doubly Linked List editorial
- 65. Valid Number
-
249. Group Shifted Strings [Modulo, HashKey的计算]
- :white_check_mark: 49. Group Anagrams
String.valueOf(char[] cs)
- :white_check_mark: 49. Group Anagrams
- 50. Pow(x, n) [Binary Exponentiation]
Top Frequency: 21~30
- ✅ 129. Sum Root to Leaf Numbers
- https://leetcode.com/problems/sum-root-to-leaf-numbers/editorial/
- Javadocs recommends to use ArrayDeque and not Stack as a stack implementation
- 112. Path Sum
- 111. Minimum Depth of Binary Tree
- 921. Minimum Add to Make Parentheses Valid
-
346. Moving Average from Data Stream [Prefix Sum, Sliding Window]
- 2090. K Radius Subarray Averages [Prefix Sum, Sliding Window]
- 670. Maximum Swap
- ✅ 973. K Closest Points to Origin [Divide and Conquer, QuickSort, Quickselecting by a pivot
x]- 💯 215. Kth Largest Element in an Array [k-th is 1-indexed, not 0-indexed]
- 347. Top K Frequent Elements
- 692. Top K Frequent Words
-
162. Find Peak Element [Binary Search]
- ✅ 852. Peak Index in a Mountain Array [Binary Search]
- 2210. Count Hills and Valleys in an Array
- 560. Subarray Sum Equals K
- 708. Insert into a Sorted Circular Linked List
- 56. Merge Intervals
- 766. Toeplitz Matrix
- 827. Making A Large Island