Tags¶
Here is a list of tags used in this site:
Abstract Data Type¶
Array¶
- 1 Two sum
- 1004 Max consecutive ones iii
- 119 Pascal's triangle ii
- 15 3sum
- 18 4sum
- 189 Rotate array
- 209 Minimum size subarray sum
- 26 Remove duplicates from sorted array
- 27 Remove element
- 325 Maximum size subarray sum equals k
- 448 Find all numbers disappeared in an array
- 485 Max consecutive ones
- 487 Max consecutive ones ii
- 560 Subarray sum equals K
- 713 Subarray product less than k
- 75 Sort colors
- 80 Remove duplicates from sorted array ii
- 862 Shortest subarray with sum at least k
- 88 Merge sorted array
- 896 Monotonic array
- 904 Fruit into baskets
- 974 Subarray sums divisible by k
Backtracking¶
- 17 Letter combinations of a phone number
- 22 Generate parentheses
- 37 Sudoku solver
- 46 Permutations
- 489 Robot room cleaner
- 51 N-Queens
- 52 N-Queens ii
- 77 Combinations
Binary Search¶
- 1011 Capacity to ship packages within D days
- 1099 Two sum less than k
- 1146 Snapshot array
- 1231 Divide chocolate
- 1235 Maximum profit in job scheduling
- 1283 Find the smallest divisor given a threshold
- 1351 Count negative numbers in a sorted matrix
- 153 Find minimum in rotated sorted array
- 1533 Find the index of the large integer
- 1539 Kth missing positive number
- 154 Find minimum in rotated sorted array ii
- 1631 Path with minimum effort
- 1802 Maximum value at a given index in a bounded array
- 1870 Minimum speed to arrive on time
- 2300 Successful pairs of spells and portions
- 240 Search a 2D matrix ii
- 275 H-index ii
- 278 First bad version
- 300 Longest increasing subsequence
- 33 Search in rotated sorted array
- 34 Find first and last position of element in sorted array
- 35 Search insert position
- 354 Russian doll envelopes
- 367 Valid perfect square
- 374 Guess number higher or lower
- 378 Kth smallest element in a sorted matrix
- 4 Median of two sorted arrays
- 410 Split array largest sum
- 436 Find right interval
- 441 Arranging coins
- 528 Random pick with weight
- 540 Single element in a sorted array
- 658 Find k closest elements
- 69 Sqrt(x)
- 702 Search in a sorted array of unknown size
- 704 Binary search
- 74 Search a 2D matrix
- 744 Find smallest letter greater than target
- 81 Search in rotated sorted array ii
- 852 Peak index in a mountain array
- 875 Koko eating bananas
- 981 Time Based Key-Value Store
Binary Search Tree¶
- 426 Convert binary search tree to sorted doubly linked list
- 700 Search in a binary search tree
- 95 Unique binary search trees ii
- 96 Unique binary search trees
- 98 Validate binary search tree
Binary Tree¶
- 100 Same tree
- 101 Symmetric tree
- 102 Binary tree level order traversal
- 104 Maximum depth of binary tree
- 105 Construct binary tree from preorder and inorder traversal
- 106 Construct binary tree from inorder and postorder traversal
- 112 Path sum
- 116 Populating next right pointers in each node
- 117 Populating next right pointers in each node ii
- 144 Binary tree preorder traversal
- 145 Binary tree postorder traversal
- 236 Lowest common ancestor of a binary tree
- 250 Count univalue subtrees
- 297 Serialize and deserialize binary tree
- 779 k-th Symbol in grammar
- 94 Binary tree inorder traversal
Bit Manipulation¶
Breadth-First Search¶
- 1091 Shortest path in binary matrix
- 1129 Shortest path with alternating colors
- 116 Populating next right pointers in each node
- 117 Populating next right pointers in each node ii
- 1202 Smallest string with swaps
- 133 Clone graph
- 139 Word break
- 1631 Path with minimum effort
- 1971 Find if Path Exists in Graph
- 200 Number of islands
- 261 Graph valid tree
- 279 Perfect square
- 286 Walls and gates
- 399 Evaluate divisions
- 429 N-ary tree level order traversal
- 494 Target sum
- 542 01 matrix
- 547 Number of provinces
- 733 Flood fill
- 752 Open the lock
- 841 Keys and rooms
- 994 Rotting oranges
- LCxxx. Title
Count¶
Data Structure¶
Depth-First Search¶
- 1059 All paths from source lead to destination
- 1202 Smallest string with swaps
- 133 Clone graph
- 1971 Find if Path Exists in Graph
- 200 Number of islands
- 261 Graph valid tree
- 399 Evaluate divisions
- 547 Number of provinces
- 733 Flood fill
- 797 All paths from source to target
- 802 Find eventual safe states
Dequeue¶
Divide and Conquer¶
- 105 Construct binary tree from preorder and inorder traversal
- 106 Construct binary tree from inorder and postorder traversal
- 218 The skyline problem
- 240 Search a 2D matrix ii
Doubly-Linked List¶
Dynamic Programming¶
- 1137 N-th Tribonacci number
- 118 Pascal's triangle
- 119 Pascal's triangle ii
- 1235 Maximum profit in job scheduling
- 1335 Minimum difficulty of a job schedule
- 139 Word break
- 1770 Maximum score from performing multiplication operations
- 198 House robber
- 221 Maximal square
- 276 Paint fence
- 300 Longest increasing subsequence
- 509 Fibonacci number
- 542 01 matrix
- 70 Climbing stairs
- 740 Delete and earn
- 746 Min cost climbing stairs
- 95 Unique binary search trees ii
- 96 Unique binary search trees
Graph¶
Hash Table¶
- 1 Two sum
- 325 Maximum size subarray sum equals k
- 448 Find all numbers disappeared in an array
- 560 Subarray sum equals K
- 904 Fruit into baskets
- 974 Subarray sums divisible by k
Heap¶
- 1046 Last stone weight
- 1167 Minimum cost to connect sticks
- 1337 The k weakest rows in a matrix
- 1642 Furthest building you can reach
- 215 Kth largest element in an array
- 218 The skyline problem
- 253 Meeting rooms ii
- 295 Find median from data stream
- 347 Top k frequent elements
- 378 Kth smallest element in a sorted matrix
- 703 Kth largest element in a stream
- 973 K closest points to origin
Line Sweep¶
Linked List¶
- 141 Linked list cycle
- 142 Linked list cycle ii
- 143 Reorder list
- 1721 Swapping nodes in a linked list
- 2 Add two numbers
- 203 Remove linked list elements
- 206 Reverse linked list
- 2095 Delete the middle node of a linked list
- 21 Merge two sorted list
- 23 Merge k sorted list
- 234 Palindrome linked list
- 237 Delete node in a linked list
- 24 Swap nodes in pairs
- 445 Add two numbers ii
- 876 Middle of the linked list
- 92 Reverse linked list ii
Math¶
- 119 Pascal's triangle ii
- 50 Pow(x, n)
- 509 Fibonacci number
- 95 Unique binary search trees ii
- 96 Unique binary search trees
Matrix¶
Minimum Spanning Tree¶
Monotonic Stack¶
Prefix Sum¶
- 209 Minimum size subarray sum
- 325 Maximum size subarray sum equals k
- 528 Random pick with weight
- 560 Subarray sum equals K
- 862 Shortest subarray with sum at least k
- 974 Subarray sums divisible by k
Queue¶
Quickselect¶
Recursion¶
Shortest Path¶
Sliding Window¶
- 1004 Max consecutive ones iii
- 485 Max consecutive ones
- 487 Max consecutive ones ii
- 713 Subarray product less than k
- 80 Remove duplicates from sorted array ii
- 904 Fruit into baskets
Slow/Fast Pointers¶
- 141 Linked list cycle
- 142 Linked list cycle ii
- 2095 Delete the middle node of a linked list
- 876 Middle of the linked list
Sorting¶
- 1099 Two sum less than k
- 1498 Number of subsequences that satisfy the given sum condition
- 2300 Successful pairs of spells and portions
- 274 H-index
- 354 Russian doll envelopes
- 611 Valid triangle number
- 75 Sort colors
- 912 Sort an array
Stack¶
- 150 Evaluate reverse polish notation
- 155 Min stack
- 20 Valid parentheses
- 206 Reverse linked list
- 232 Implement queue using stacks
- 394 Decode string
- 739 Daily temperatures
- 92 Reverse linked list ii
String¶
Topological Sort¶
- 1136 Parallel courses
- 207 Course schedule
- 210 Course schedule ii
- 269 Alien dictionary
- 310 Minimum height trees
Two Pointers¶
- 1099 Two sum less than k
- 1498 Number of subsequences that satisfy the given sum condition
- 15 3sum
- 18 4sum
- 209 Minimum size subarray sum
- 26 Remove duplicates from sorted array
- 27 Remove element
- 325 Maximum size subarray sum equals k
- 344 Reverse string
- 485 Max consecutive ones
- 487 Max consecutive ones ii
- 713 Subarray product less than k
- 75 Sort colors
- 80 Remove duplicates from sorted array ii
- 88 Merge sorted array
Union Find¶
- 1101 The earliest moment when everyone become friends
- 1168 Optimize water distribution in a village
- 1202 Smallest string with swaps
- 1584 Min cost to connect all points
- 1971 Find if Path Exists in Graph
- 261 Graph valid tree
- 323 Number of connected components in an undirected graph
- 399 Evaluate divisions