Leetcode with Adam
1196 how many apples can you put into the basket
Initializing search
Home
Algorithm
Data Structure
String
Contest
Techniques
Design Pattern
Leetcode
Leetcode with Adam
Home
Home
Algorithm
Algorithm
Binary Search
Bit Manipulation
Bit Manipulation
Tricks with Bit
1. xor in array
2. power of two
Enumerate
Recursion
Recursion
recursion
divide and conquer
backtracking
Data Structure
Data Structure
stack
queue
monotonic queue
monotonic stack
heap
heap
heapify is linear?
tree
tree
LC problems
String
String
String Fundamental
Pattern Matching
Pattern Matching
Single Pattern Matching
Single Pattern Matching
Brute Force
KMP
Automata
Contest
Contest
biweekly history
weekly history
Techniques
Techniques
Prefix Sum
Line Sweep
Two Pointers
Sliding Window
Greedy
Design Pattern
Design Pattern
None
Singleton
Factories
Builder
Leetcode
Leetcode
1 two sum
2 add two numbers
3 longest substring without repeating characters
5 longest palindromic substring
6 zigzag conversion
9 palindrome number
11 container with most water
13 roman to integer
14 longest common prefix
15 three sum
16 3sum closest
19 remove nth node from end of list
20 valid parentheses
21 merge two sorted lists
24 swap nodes in pairs
25 reverse nodes in k groups
26 remove duplicates from sorted array
28 implement strstr
28 find the index of the first occurrence in a string
33 search in rotated sorted array
34 find first and last position of element in sorted array
35 search insert position
36 valid sudoku
41 first missing positive
42 trapping rain water
46 permutations
53 maximum subarray
55 jump game
56 merge intervals
57 insert interval
58 length of last word
59 group anagrams
61 rotate list
62 unique paths
63 unique paths II
64 minimum path sum
69 binary search
70 climbing stairs
72 edit distance
74 search a 2D matrix
76 minimum window substring
77 combinations
78 subsets
79 word search
83 remove duplicates from sorted list
85 maximal rectangle
92 reverse linked list II
94 binary tree inorder traversal
100 same tree
101 symmetric tree
102 binary tree level order traversal
103 binary tree zigzag level order traversal
104 maximum depth of binary tree
107 binary tree level order traversal II
111 minimum depth of binary tree
112 path sum
113 path sum II
118 pascal triangle
119 pascal triangle II
120 triangle
121 best time to buy and sell stock
122 best time to buy and sell stock II
125 valid palindrome
128 longest consecutive sequence
129 sum root to leaf numbers
136 single number
141 linked list cycle
142 linked list cycle II
143 reorder list
144 binary tree preorder traversal
145 binary tree postorder traversal
146 lru cache
150 evaluate reverse polish notation
152 maximum product subarray
153 find minimum in rotated sorted array
159 longest substring with at most two distinct characters
160 intersection of two linked list
161 one edit distance
164 maximum gap
165 compare version numbers
167 two sum II input array is sorted
169 majority element
191 number of 1 bits
198 house robber
200 number of islands
201 bitwise and of numbers range
202 happy number
203 remove linked list elements
205 isomorphic strings
206 reverse linked list
209 minimum size subarray sum
213 house robber II
215 kth largest element in an array
217 contains duplicate
219 contain duplicate II
221 maximum square
226 invert binary tree
230 kth smallest element in BST
2. power of two
232 implement queue using stacks
234 palindrome linked list
237 delete node in a linked list
238 product of array except self
239 sliding window maximum
242 valid anagram
243 shortest word distance
252 meeting rooms
253 meeting rooms II
255 verify preorder sequence in binary search tree
257 binary tree paths
266 palindrome permutation
1. xor in array
278 first bad version
279 perfect squares
283 Move Zeros
287 find the duplicate number
300 longest increasing subsequence
304 range sum query 2D immutable
310 minimum height tree
314 binary tree vertical order traversal
325 maximum size subarray sum equals k
328 odd even linked list
340 longest substring with at most k distinct characters
344 reverse string
346 moving average from data stream
347 top k frequent elements
349 intersection of two arrays
368 largest divisible subset
370 range addition
374 guess number higher or lower
383 ransom note
387 first unique character in a string
395 longest substring with at least k repeating characters
402 remove k digits
404 sum of left leaves
408 valid word abbreviation
409 longest palindrome
412 fizz buzz
435 non overlapping intervals
441 arranging coins
442 find all duplicates in an array
451 sort characters by frequency
452 minimum number of arrows to burst balloons
456 132 pattern
463 island perimeter
496 next greater element I
509 fibonacci number
513 find bottom left tree value
523 continuous subarray sum
525 contiguous array
530 minimum absolute difference in BST
543 diameter of binary tree
560 subarray sum equals k
576 out of boundary paths
577 reverse words in a string III
617 merge two binary trees
621 task scheduler
622 design circular queue
623 add one row to tree
629 k inverse pair array
643 maximum average subarray I
645 set mismatch
647 palindromic substrings
653 two sum IV input is a BST
658 Find K Closest Elements
673 number of longest increasing subsequence
678 valid parenthesis string
680 valid palindrome II
692 top k frequent words
700 search in a binary search tree
703 kth largest element in a stream
704 binary search
713 subarray product less than k
718 maximum length of repeated subarray
724 find pivot index
739 daily temperatures
740 delete and earn
744 find smallest letter greater than target
746 min cost climbing stairs
752 open the lock
771 jewels and stones
783 minimum distance between BST nodes
791 custom sort string
862 shortest subarray with sum at least K
873 length of longest fibonacci subsequence
875 koko eating bananas
876 middle of the linked list
881 boats to save people
887 super egg drop
918 maximum sum circular subarray
930 binary subarrays with sum
931 minimum falling path sum
938 range sum of BST
941 valid mountain array
948 bag of tokens
950 reveal cards in increasing order
953 verifying an alien dictionary
973 K closest points to origin
974 subarray sums divisible by K
977 squares of a sorted array
978 longest turbulent subarray
983 minimum cost for tickets
986 interval list intersections
988 smallest string starting from leaf
992 subarrays with k different integers
997 find the town judge
1004 Max Consecutive Ones III
1011 capacity to ship packages within D days
1014 best sightseeing pair
1025 divisor game
1043 partition array for maximum sum
1046 last stone weight
1074 number of submatrices that sum to target
1086 high five
1108 defanging an ip address
1119 remove vowels from a string
1133 largest unique number
1134 Armstrong Number
1137 N th Tribonacci number
1143 longest common subsequence
1150 check if a number is majority element in a sorted array
1165 single row keyboard
1171 remove zero sum consecutive nodes from linked list
1180 count substrings with only one distinct letter
1186 maximum subarray sum with one deletion
1191 k concatenation maximum sum
1196 how many apples can you put into the basket
1213 intersection of three sorted array
1229 meeting scheduler
1248 count number of nice subarrays
1272 remove interval
1288 remove covered intervals
1289 minimum falling path sum II
1290 convert binary number in a linked list to integer
1305 all elements in two binary search trees
1351 count negative numbers in a sorted matrix
1365 how many numbers are smaller than the current number
1385 find the distance value between two arrays
1457 pseudo palindrome paths in a binary tree
1463 cherry pickup II
1464 maximum product of two elements in an array
1469 find all the lonely nodes
1474 delete N nodes after M nodes of a linked list
1475 final prices with a special discount in a shop
1480 running sum of 1d array
1481 least number of unique intergers after K removals
1512 number of good pairs
1542 number of subarrays with odd sum
1544 make the string great
1567 maximum length of subarray with positive product
1570 dot product of two sparse vectors
1609 even odd tree
1614 maximum nesting depth of the parentheses
1642 furthest building you can reach
1669 merge in between linked lists
1685 sum of absolute differences in a sorted array
1700 number of students unable to eat lunch
1710 maximum units on a truck
1750 minimum length of string after deleting similar ends
1762 buildings with an ocean view
1768 merge strings alternately
1876 substring of size three with distinct characters
1915 number of wonderful substrings
1971 find if path exists in graph
1992 find all groups of farmland
2000 reverse prefix of word
2073 time needed to buy tickets
2108 find the first palindromic string in the array
2130 maximum twin sum of a linked list
2149 rearrange array elements by sign
2219 maximum sum score of array
2370 longest ideal subsequence
2441 largest possible integer
2444 count subarrays with fixed bounds
2485 find the pivot integer
2487 remove nodes from linked list
2512 reward top k students
2516 take k of each characters from left and right
2540 minimum common value
2730 find the longest semi repetitive substring
2739 total distance traveled
2740 find the value of the partition
2748 number of beautiful pairs
2785 sort vowels in a string
2799 count complete subarrays in an array
2824 count pairs whose sum is less than target
2831 find the longest equal subarray
2864 maximum odd binary number
2958 length of longest subarray with at most k frequency
2962 count subarrays where max element appears at least k times
2966 divide array into arrays with max difference
2971 find polygon with the largest perimeter
2974 minimum number game
2997 minimum number of operations to make array XOR equal to k
3005 count elements with maximum frequency
3042 count prefix and suffix pairs II
3043 find the length of the longest common prefix
3044 most frequent prime
3045 count prefix and suffix pairs II
3062 winner of the liked list game
3066 minimum operations to exceed threshold value II
3085 minimum deletions to make string k special
3090 maximum length substring with two occurrences
3091 apply operations to make sum of array greater than or equal to k
3092 most frequent ids
3095 shortest subarray with OR at least K I
3096 minimum levels to gain more points
3097 shortest subarray with OR at least K II
3099 harshad number
3100 water bottles II
3101 count alternating subarrays
3105 longest strictly increasing or strictly decreasing subarray
3106 lexicographically smallest string after operations with constraint
3107 minimum operations to make median of array equal to K
3110 score of a string
3111 minimum rectangles to cover points
3113 Find the Number of Subarrays Where Boundary Elements Are Maximum
3136 valid word
3137 minimum number of operations to make word k periodic
3138 minimum length of anagram concatenation
1196 how many apples can you put into the basket
Back to top