Problem library

All problems

A searchable reference of every problem I have solved, with categories and complexity at a glance.

944 / 944 problems
Problem Solved
Lowest common ancestor of a binary tree IV
tree
Aug 7, 2023
Split strings by separator
array-and-hashmap
Jul 24, 2023
Number of increasing paths in a grid
dynamic-programming graph
Jun 17, 2023
Missing ranges
array-and-hashmap
Jun 14, 2023
Check if all characters have equal number of occurrences
array-and-hashmap
Jun 13, 2023
Summary ranges
array-and-hashmap
Jun 11, 2023
Maximum value at a given index in a bounded array
binary-search
Jun 9, 2023
Check if a number is majority element in a sorted array
binary-search
Jun 7, 2023
Count negative numbers in a sorted matrix
array-and-hashmap
Jun 7, 2023
Can make arithmetic progression from sequence
math-and-geometry array-and-hashmap
Jun 5, 2023
Check if it is a straight line
math-and-geometry
Jun 4, 2023
Time needed to inform all employees
graph
Jun 2, 2023
Shortest path in binary matrix
graph
Jun 1, 2023
Number of substrings containing all three characters
sliding-window
May 28, 2023
Vowels of all substrings
dynamic-programming
May 28, 2023
Stone game II
dynamic-programming
May 27, 2023
Stone game III
dynamic-programming
May 27, 2023
Univalued binary tree
tree
May 27, 2023
Count vowel strings in ranges
array-and-hashmap
May 24, 2023
Left and right sum differences
array-and-hashmap
May 24, 2023
Maximum subsequence score
heap
May 23, 2023
Sum in a matrix
math-and-geometry
May 23, 2023
Find three consecutive integers that sum to a given number
math-and-geometry
May 22, 2023
Split a circular linked list
linked-list
May 22, 2023
Kth largest sum in a binary tree
heap tree
May 21, 2023
K-th smallest prime fraction
heap
May 20, 2023
Maximum profit from trading stocks
dynamic-programming
May 20, 2023
Check if word equals summation of two words
array-and-hashmap
May 19, 2023
The kth factor of n
math-and-geometry
May 19, 2023
Number of adjacent elements with the same color
array-and-hashmap
May 18, 2023
Diameter of N-ary tree
tree
May 17, 2023
Number of good leaf nodes pairs
tree
May 17, 2023
Remove sub folders from the filesystem
trie
May 15, 2023
Consecutive characters
array-and-hashmap
May 14, 2023
Count triplets that can form two arrays of equal xor
bit-manipulation
May 13, 2023
Make array zero by subtracting equal amounts
heap math-and-geometry
May 13, 2023
Maximum product of two elements in an array
heap
May 13, 2023
Android unlock patterns
backtracking
May 12, 2023
Count ways to build good strings
dynamic-programming
May 12, 2023
Find permutation
array-and-hashmap
May 12, 2023
Letter tile possibilities
backtracking
May 12, 2023
Maximum length of subarray with positive product
dynamic-programming
May 11, 2023
Solving questions with brainpower
dynamic-programming
May 11, 2023
Equal tree partition
tree
May 10, 2023
Largest unique number
array-and-hashmap
May 10, 2023
Uncrossed lines
dynamic-programming
May 10, 2023
Increasing order search tree
tree
May 9, 2023
Prime in diagonal
array-and-hashmap
May 8, 2023
Valid boomerang
math-and-geometry
May 8, 2023
Matrix diagonal sum
array-and-hashmap
May 7, 2023
Sort array by increasing frequency
array-and-hashmap
May 7, 2023
Concatenation of array
array-and-hashmap
May 6, 2023
Find score of an array after marking all elements
heap
May 6, 2023
Find the longest valid obstacle course at each position
binary-search
May 6, 2023
Maximum number of vowels in a substring of given length
array-and-hashmap
May 5, 2023
Substrings that begin and end with the same letter
array-and-hashmap math-and-geometry
May 5, 2023
Index pairs of a string
array-and-hashmap
May 4, 2023
Maximum sum with exactly k elements
array-and-hashmap
May 4, 2023
Greatest common divisor of strings
math-and-geometry
Feb 1, 2023
Sentence similarity
array-and-hashmap graph
Feb 1, 2023
Best team with no conflicts
dynamic-programming
Jan 31, 2023
Game of nim
bit-manipulation
Jan 29, 2023
LFU cache
linked-list design
Jan 29, 2023
Data stream as disjoint intervals
intervals
Jan 28, 2023
Concatenated words
trie
Jan 27, 2023
Find closest node to given two nodes
graph
Jan 25, 2023
Find minimum time to finish all jobs II
greedy
Jan 24, 2023
Queue reconstruction by height
greedy
Jan 23, 2023
Confusing number II
backtracking
Jan 22, 2023
Candy
array-and-hashmap
Jan 21, 2023
Subarray sums divisible by k
array-and-hashmap
Jan 19, 2023
Count the number of good subarray
sliding-window
Jan 18, 2023
Find the celebrity
two-pointers
Jan 17, 2023
Flip string to monotone increasing
array-and-hashmap
Jan 17, 2023
Minimum moves to reach target score
greedy
Jan 16, 2023
Percentage of letter in string
array-and-hashmap
Jan 16, 2023
Difference between element sum and digit sum of an array
array-and-hashmap
Jan 15, 2023
Find the index of the large integer
binary-search
Jan 15, 2023
Number of good paths
tree
Jan 15, 2023
Lexicographically smallest equivalent string
graph
Jan 14, 2023
Longest path with different adjacent characters
tree
Jan 13, 2023
Number of good binary strings
dynamic-programming
Jan 13, 2023
Number of nodes in the sub tree with the same label
tree
Jan 12, 2023
Maximum binary string after change
greedy
Jan 11, 2023
Maximum number of points with cost
dynamic-programming
Jan 11, 2023
Minimum time to collect all apples in a tree
tree graph
Jan 11, 2023
Find good days to rob the bank
array-and-hashmap
Jan 10, 2023
Shuffle the array
array-and-hashmap
Jan 10, 2023
Confusing number
array-and-hashmap
Jan 9, 2023
Find and replace in string
array-and-hashmap
Jan 9, 2023
Maximal score after applying k operations
heap
Jan 9, 2023
Find xor beauty of array
bit-manipulation
Jan 8, 2023
Max points on a line
math-and-geometry
Jan 8, 2023
Minimum health to beat game
greedy
Jan 8, 2023
Assign cookies
greedy
Jan 7, 2023
Max increase to keep city skyline
greedy
Jan 6, 2023
Maximum ice cream bars
greedy heap
Jan 6, 2023
Minimum operations to make the array alternating
greedy array-and-hashmap
Jan 6, 2023
Most profit assigning work
greedy two-pointers
Jan 6, 2023
Number of segments in a string
array-and-hashmap
Jan 5, 2023
Steps to make array non decreasing
stack dynamic-programming
Jan 5, 2023
Check if number is a sum of powers of three
math-and-geometry
Jan 4, 2023
Check if there is a valid path in a grid
graph
Jan 4, 2023
Convert to base -2
math-and-geometry
Jan 4, 2023
Delete columns to make sorted
array-and-hashmap
Jan 3, 2023
Finding the number of visible mountains
stack
Jan 3, 2023
Car pooling
array-and-hashmap
Jan 2, 2023
Divide intervals into minimum number of groups
heap intervals
Jan 2, 2023
K highest ranked items within a price range
heap graph
Jan 2, 2023
Count the digits that divide a number
math-and-geometry
Jan 1, 2023
Count the number of k big indices
binary-search
Jan 1, 2023
Distinct prime factors of product of array
math-and-geometry
Jan 1, 2023
Sum of all odd length subarrays
array-and-hashmap
Jan 1, 2023
Two sum bsts
tree
Jan 1, 2023
Create binary tree from descriptions
tree
Dec 31, 2022
Sum of all subset xor totals
backtracking
Dec 31, 2022
Unique paths III
backtracking
Dec 31, 2022
3sum smaller
array-and-hashmap
Dec 30, 2022
adding-spaces-to-a-string
array-and-hashmap
Dec 30, 2022
Remove letter to equalize frequency
array-and-hashmap
Dec 30, 2022
Leftmost column with at least a one
binary-search
Dec 29, 2022
Count number of ways to place houses
math-and-geometry
Dec 28, 2022
Design a leaderboard
array-and-hashmap design
Dec 28, 2022
Maximum tastiness of candy basket
binary-search
Dec 28, 2022
Minimum increment to make array unique
greedy
Dec 28, 2022
Minimum path cost in a grid
dynamic-programming
Dec 28, 2022
Minimum penalty for a shop
array-and-hashmap greedy
Dec 28, 2022
Minimum remove to make valid parentheses
stack
Dec 28, 2022
First day where you have been in all the rooms
dynamic-programming
Dec 27, 2022
Maximum bags with full capacity of rocks
greedy
Dec 27, 2022
Next palindrome using same digits
math-and-geometry
Dec 27, 2022
Perfect number
math-and-geometry
Dec 27, 2022
Prefix and suffix search
array-and-hashmap design
Dec 27, 2022
Synonymous sentences
graph
Dec 27, 2022
XOR operation in an array
bit-manipulation
Dec 27, 2022
Bitwise or of all subsequence sums
bit-manipulation
Dec 26, 2022
Out of boundary paths
dynamic-programming
Dec 26, 2022
Shortest unsorted continuous subarray
greedy
Dec 26, 2022
Count anagrams
math-and-geometry
Dec 25, 2022
Longest subsequence with limited sum
array-and-hashmap
Dec 25, 2022
Minimum number of moves to make palindrome
two-pointers
Dec 25, 2022
Most popular video creator
array-and-hashmap heap
Dec 25, 2022
Reward top k students
array-and-hashmap
Dec 25, 2022
Take k of each character from left and right
array-and-hashmap two-pointers
Dec 25, 2022
Beautiful array
array-and-hashmap
Dec 24, 2022
Custom sort string
array-and-hashmap
Dec 24, 2022
Domino and tromino tiling
dynamic-programming
Dec 24, 2022
Number of distinct islands
graph
Dec 24, 2022
Valid triangle number
greedy binary-search
Dec 24, 2022
Convert binary search tree to sorted doubly linked list
linked-list tree
Dec 23, 2022
Count good meals
array-and-hashmap
Dec 23, 2022
Flatten a multilevel doubly linked list
linked-list tree
Dec 23, 2022
Check if there is a path with equal number of 0s and 1s
dynamic-programming
Dec 22, 2022
Largest values from labels
greedy
Dec 22, 2022
Sum of distances in tree
tree
Dec 22, 2022
Find distance in a binary tree
tree
Dec 21, 2022
Largest merge of two strings
greedy
Dec 21, 2022
Maximal network rank
graph
Dec 21, 2022
Possible bipartition
graph
Dec 21, 2022
Backspace string compare
stack
Dec 20, 2022
Longest mountain in array
two-pointers
Dec 20, 2022
Minimum initial energy to finish tasks
greedy
Dec 20, 2022
Shifting letters
array-and-hashmap
Dec 20, 2022
Ways to make a fair array
array-and-hashmap
Dec 20, 2022
Binary tree longest consecutive sequence
tree
Dec 19, 2022
Check if array pairs are divisible by k
array-and-hashmap
Dec 19, 2022
Clone binary tree with random pointer
tree
Dec 19, 2022
Decode the message
array-and-hashmap
Dec 19, 2022
Delete n nodes after m nodes of a linked list
linked-list
Dec 19, 2022
Maximum number of books you can take
stack
Dec 19, 2022
Path crossing
array-and-hashmap
Dec 19, 2022
Check if there is a valid parentheses string path
dynamic-programming
Dec 18, 2022
Day of the year
math-and-geometry
Dec 18, 2022
Pancake sorting
array-and-hashmap
Dec 18, 2022
Powerful integers
math-and-geometry
Dec 18, 2022
Add two integers
math-and-geometry
Dec 17, 2022
Apply discount to prices
array-and-hashmap
Dec 17, 2022
Maximum sum score of array
array-and-hashmap
Dec 17, 2022
Minimum rounds to complete all tasks
greedy
Dec 17, 2022
Number of boomerangs
array-and-hashmap
Dec 17, 2022
Replace elements in an array
array-and-hashmap
Dec 17, 2022
Root equals sum of children
tree
Dec 17, 2022
Ternary expression parser
stack
Dec 17, 2022
Encode number
array-and-hashmap
Dec 16, 2022
Number of closed islands
graph
Dec 16, 2022
Widest pair of indices with equal range sum
array-and-hashmap
Dec 16, 2022
Campus bikes II
dynamic-programming
Dec 15, 2022
Append k integers with minimal sum
greedy
Dec 14, 2022
Count number of homogenous substrings
array-and-hashmap
Dec 14, 2022
Minimum number of operations to move all balls to each box
array-and-hashmap
Dec 14, 2022
Ugly number III
math-and-geometry
Dec 14, 2022
Check whether two strings are almost equivalent
array-and-hashmap
Dec 13, 2022
Detect capital
array-and-hashmap
Dec 13, 2022
Increasing subsequences
backtracking
Dec 13, 2022
Letter case permutation
backtracking
Dec 13, 2022
Moving average from data stream
queue design
Dec 13, 2022
Average waiting time
intervals array-and-hashmap
Dec 12, 2022
Longest square streak in an array
greedy
Dec 12, 2022
Longest univalue path
tree
Dec 12, 2022
Lowest common ancestor of deepest leaves
tree
Dec 12, 2022
Maximum level sum of a binary tree
tree
Dec 12, 2022
Maximum nesting depth of two valid parentheses strings
stack
Dec 12, 2022
Smallest subtree with all the deepest nodes
tree
Dec 12, 2022
Best time to buy and sell stock with transaction fee
dynamic-programming
Dec 11, 2022
Minimum cost to connect sticks
heap
Dec 11, 2022
Remove nodes from linked list
linked-list
Dec 11, 2022
Removing stars from a string
stack
Dec 11, 2022
Find the longest substring containing vowels in even counts
array-and-hashmap
Dec 10, 2022
Maximum product of splitted binary tree
tree
Dec 10, 2022
Partition array such that maximum difference is k
greedy
Dec 10, 2022
Valid palindrome IV
array-and-hashmap two-pointers
Dec 10, 2022
Add two polynomials represented as linked lists
linked-list
Dec 9, 2022
Design hit counter
design queue
Dec 9, 2022
Longest substring with at least k repeating characters
array-and-hashmap
Dec 9, 2022
Maximize the confusion of an exam
sliding-window
Dec 9, 2022
Number of pairs of interchangeable rectangles
array-and-hashmap
Dec 9, 2022
Find root of N-ary tree
tree
Dec 8, 2022
Insert into a sorted circular linked list
linked-list
Dec 8, 2022
Maximum number of non overlapping subarrays with sum equals target
greedy
Dec 8, 2022
Range frequency queries
binary-search design
Dec 8, 2022
Can you eat your favorite candy on your favorite day
array-and-hashmap
Dec 7, 2022
Design tic tac toe
design
Dec 7, 2022
Maximum size subarray sum equals k
array-and-hashmap
Dec 7, 2022
Minimum cost to buy apples
graph
Dec 7, 2022
Number of subarrays having even product
array-and-hashmap
Dec 7, 2022
Range sum of bst
tree
Dec 7, 2022
Words within two edits of dictionary
array-and-hashmap
Dec 7, 2022
Alert using same key card three or more times in a one hour period
array-and-hashmap
Dec 6, 2022
Describe the painting
array-and-hashmap
Dec 6, 2022
Encode and decode strings
design
Dec 6, 2022
largest-bst-subtree
tree
Dec 6, 2022
Number of ways to buy pens and pencils
math-and-geometry
Dec 6, 2022
Find center of star graph
graph
Dec 5, 2022
Find k pairs with smallest sums
heap
Dec 5, 2022
Fraction to recurring decimal
math-and-geometry
Dec 5, 2022
Middle of the linked list
linked-list
Dec 5, 2022
Minimum score of a path between two cities
graph
Dec 5, 2022
One edit distance
array-and-hashmap
Dec 5, 2022
Remove interval
intervals
Dec 5, 2022
Wiggle sort
array-and-hashmap
Dec 5, 2022
Implement trie II (prefix tree)
trie design
Dec 4, 2022
Minimum average difference
array-and-hashmap
Dec 4, 2022
Minimum number of steps to make two strings anagram II
array-and-hashmap
Dec 4, 2022
Minimum number of steps to make two strings anagram
array-and-hashmap
Dec 4, 2022
Find k length substrings with no repeated characters
sliding-window
Dec 3, 2022
Longest string chain
dynamic-programming
Dec 3, 2022
Longest substring with at most k distinct characters
sliding-window
Dec 3, 2022
Longest substring with at most two distinct characters
sliding-window
Dec 3, 2022
Number of connected components in an undirected graph
graph
Dec 3, 2022
Number of subarrays with gcd equal to k
math-and-geometry
Dec 3, 2022
Number of subarrays with lcm equal to k
math-and-geometry
Dec 3, 2022
Connecting cities with minimum cost
graph
Dec 2, 2022
Determine if two strings are close
array-and-hashmap
Dec 2, 2022
Minimum cost to reach city with discounts
graph
Dec 2, 2022
Nth digit
math-and-geometry
Dec 2, 2022
Previous permutation with one swap
greedy
Dec 2, 2022
Search in a sorted array of unknown size
binary-search
Dec 2, 2022
Determine if string halves are alike
array-and-hashmap
Dec 1, 2022
Evaluate the bracket pairs of a string
array-and-hashmap
Dec 1, 2022
Factorial trailing zeroes
math-and-geometry
Dec 1, 2022
Majority element II
array-and-hashmap
Dec 1, 2022
Path sum IV
tree
Dec 1, 2022
Single row keyboard
array-and-hashmap
Dec 1, 2022
Bitwise xor of all pairings
bit-manipulation
Nov 30, 2022
Count nodes equal to average of subtree
tree
Nov 30, 2022
Find all lonely numbers in the array
array-and-hashmap
Nov 30, 2022
Find leaves of binary tree
tree
Nov 30, 2022
Fizz buzz
array-and-hashmap
Nov 30, 2022
Maximum average subtree
tree
Nov 30, 2022
Maximum split of positive even integers
greedy
Nov 30, 2022
Nim game
math-and-geometry
Nov 30, 2022
Partitioning into minimum number of deci binary numbers
greedy
Nov 30, 2022
Recover a tree from preorder traversal
tree
Nov 30, 2022
Remove duplicates from an unsorted linked list
linked-list
Nov 30, 2022
Sparse matrix multiplication
math-and-geometry
Nov 30, 2022
Unique number of occurrences
array-and-hashmap
Nov 30, 2022
Unique word abbreviation
array-and-hashmap design
Nov 30, 2022
Verify preorder sequence in binary search tree
tree
Nov 30, 2022
Count of smaller numbers after self
binary-search
Nov 29, 2022
Count univalue subtrees
tree
Nov 29, 2022
Generate a string with characters that have odd counts
array-and-hashmap
Nov 29, 2022
Inorder successor in BST
tree
Nov 29, 2022
Longest subarray of 1s after deleting one element
two-pointers
Nov 29, 2022
Print immutable linked list in reverse
linked-list stack
Nov 29, 2022
Reverse words in a string II
array-and-hashmap
Nov 29, 2022
Valid palindrome III
dynamic-programming
Nov 29, 2022
Binary tree vertical order traversal
tree
Nov 28, 2022
Count nodes equal to sum of descendants
tree
Nov 28, 2022
Count number of bad pairs
dynamic-programming
Nov 28, 2022
Count pairs in two arrays
binary-search
Nov 28, 2022
Design hashset
design array-and-hashmap
Nov 28, 2022
Design phone directory
design
Nov 28, 2022
Find players with zero or one losses
array-and-hashmap
Nov 28, 2022
Minimize product sum of two arrays
greedy
Nov 28, 2022
Remove zero sum consecutive nodes from linked list
linked-list
Nov 28, 2022
Shortest word distance
array-and-hashmap
Nov 28, 2022
Validate binary tree nodes
tree
Nov 28, 2022
Arithmetic slices II subsequence
dynamic-programming
Nov 27, 2022
Arithmetic slices
dynamic-programming
Nov 27, 2022
Binary tree upside down
tree
Nov 27, 2022
Check if word is valid after substitutions
stack
Nov 26, 2022
Design browser history
linked-list
Nov 26, 2022
Find smallest common element in all rows
array-and-hashmap
Nov 26, 2022
Maximum number of coins you can get
greedy queue
Nov 26, 2022
Maximum twin sum of a linked list
linked-list
Nov 26, 2022
Meeting rooms III
intervals heap
Nov 26, 2022
Minimize maximum pair sum in array
greedy
Nov 26, 2022
Next greater node in linked list
linked-list stack
Nov 26, 2022
Spiral matrix IV
linked-list
Nov 26, 2022
Strobogrammatic number
array-and-hashmap
Nov 26, 2022
Add two numbers II
linked-list stack
Nov 25, 2022
Find greatest common divisor of array
math-and-geometry
Nov 25, 2022
Sum of subarray minimums
stack
Nov 25, 2022
Swapping nodes in a linked list
linked-list
Nov 25, 2022
Complement of base 10 integer
bit-maniuplation
Nov 24, 2022
Minimum number of arrows to burst balloons
greedy
Nov 24, 2022
Stone game VII
dynamic-programming
Nov 24, 2022
The employee that worked on the longest task
array-and-hashmap
Nov 24, 2022
Broken calculator
greedy
Nov 23, 2022
Delete duplicate folders in system
trie
Nov 23, 2022
Final prices with a special discount in a shop
stack
Nov 23, 2022
Integer to english words
array-and-hashmap greedy
Nov 23, 2022
Power of two
math-and-geometry bit-maniuplation
Nov 23, 2022
Rabbits in forest
math-and-geometry
Nov 23, 2022
Sliding window median
sliding-window
Nov 23, 2022
odd-even-jump
dynamic-programming stack
Nov 22, 2022
132 pattern
stack
Nov 22, 2022
Boats to save people
two-pointers
Nov 22, 2022
Number of ways to paint N×3 grid
dynamic-programming
Nov 22, 2022
Process tasks using servers
heap
Nov 22, 2022
Random pick index
array-and-hashmap design
Nov 22, 2022
Shuffle an array
math-and-geometry design
Nov 22, 2022
Sort colors
two-pointers array-and-hashmap
Nov 22, 2022
Split array largest sum
binary-search
Nov 22, 2022
Base 7
math-and-geometry
Nov 21, 2022
Camelcase matching
two-pointers queue
Nov 21, 2022
design linked list
linked-list design
Nov 21, 2022
Linked list in binary tree
linked-list tree
Nov 21, 2022
Maximum sum circular subarray
array-and-hashmap
Nov 21, 2022
Minimum addition to make integer beautiful
math-and-geometry
Nov 21, 2022
Nearest exit from entrance in maze
graph
Nov 21, 2022
Number of operations to make network connected
graph
Nov 21, 2022
Sum of absolute differences in a sorted array
array-and-hashmap
Nov 21, 2022
Total cost to hire k workers
heap
Nov 21, 2022
Vowel spellchecker
array-and-hashmap
Nov 21, 2022
All nodes distance k in binary tree
tree
Nov 20, 2022
Find all duplicates in an array
array-and-hashmap
Nov 20, 2022
Maximum length of pair chain
greedy
Nov 20, 2022
Number of orders in the backlog
heap
Nov 20, 2022
Number of ways to arrive at destination
graph
Nov 20, 2022
Path with maximum probability
graph
Nov 20, 2022
Reverse prefix of word
array-and-hashmap
Nov 20, 2022
Shopping offers
dynamic-programming
Nov 20, 2022
Widest vertical area between two points containing no points
array-and-hashmap
Nov 20, 2022
Binary subarrays with sum
array-and-hashmap sliding-window
Nov 19, 2022
Erect the fence
math-and-geometry
Nov 19, 2022
Maximum product after k increments
heap
Nov 19, 2022
Number of ways to split array
array-and-hashmap
Nov 19, 2022
First letter to appear twice
array-and-hashmap
Nov 18, 2022
Frog position after t seconds
graph
Nov 18, 2022
Linked list components
linked-list
Nov 18, 2022
Find the highest altitude
array-and-hashmap
Nov 17, 2022
Finding the users active minutes
array-and-hashmap
Nov 17, 2022
Number of digit one
math-and-geometry
Nov 17, 2022
Rectangle area
math-and-geometry
Nov 17, 2022
Symmetric tree
tree
Nov 17, 2022
Construct binary search tree from preorder traversal
tree
Nov 16, 2022
Count days spent together
array-and-hashmap
Nov 16, 2022
Delete nodes and return forest
tree
Nov 16, 2022
Insert into a binary search tree
tree
Nov 16, 2022
Making file names unique
array-and-hashmap
Nov 16, 2022
Minimum distance to the target element
array-and-hashmap
Nov 16, 2022
Minimum time visiting all points
greedy
Nov 16, 2022
Path in zigzag labelled binary tree
tree
Nov 16, 2022
Shortest subarray to be removed to make array sorted
two-pointers
Nov 16, 2022
Trim a binary search tree
tree
Nov 16, 2022
Binary tree tilt
tree
Nov 15, 2022
Count of matches in tournament
math-and-geometry
Nov 15, 2022
Dungeon game
dynamic-programming
Nov 15, 2022
Find duplicate subtrees
tree
Nov 15, 2022
Find mode in binary search tree
tree
Nov 15, 2022
Longest substring of all vowels in order
sliding-window
Nov 15, 2022
Make two arrays equal by reversing subarrays
array-and-hashmap
Nov 15, 2022
Maximum area of a piece of cake after horizontal and vertical cuts
greedy
Nov 15, 2022
Maximum width of binary tree
tree
Nov 15, 2022
Maximum xor after operations
bit-manipulation
Nov 15, 2022
Most frequent subtree sum
tree
Nov 15, 2022
Path sum III
dynamic-programming backtracking tree
Nov 15, 2022
Merge strings alternately
array-and-hashmap
Nov 14, 2022
Most stones removed with same row or column
graph
Nov 14, 2022
Maximum frequency stack
stack design
Nov 13, 2022
Number of subarrays with bounded maximum
two-pointers
Nov 13, 2022
Leaf similar trees
tree
Nov 12, 2022
Least number of unique integers after k removals
heap
Nov 12, 2022
Number of zero filled subarrays
math-and-geometry
Nov 12, 2022
Count numbers with unique digits
math-and-geometry
Nov 11, 2022
Removing minimum number of magic beans
array-and-hashmap
Nov 11, 2022
Find peak element
binary-search
Nov 10, 2022
Maximum nesting depth of the parentheses
stack
Nov 10, 2022
Remove all adjacent duplicates in string II
stack
Nov 10, 2022
Remove all adjacent duplicates in string
stack
Nov 10, 2022
Score of parentheses
stack
Nov 10, 2022
Triangle
dynamic-programming
Nov 10, 2022
Distribute candies
array-and-hashmap
Nov 9, 2022
Online stock span
stack
Nov 9, 2022
Average value of even numbers that are divisible by three
math-and-geometry
Nov 8, 2022
Knight dialer
dynamic-programming
Nov 8, 2022
Make the string great
stack
Nov 8, 2022
Minimum money required before transactions
greedy
Nov 8, 2022
Pascals triangle II
array-and-hashmap
Nov 8, 2022
Array with elements not equal to average of neighbors
two-pointers
Nov 7, 2022
Maximum 69 number
array-and-hashmap
Nov 7, 2022
Number of subsequences that satisfy the given sum condition
two-pointers
Nov 7, 2022
Wiggle sort II
array-and-hashmap
Nov 7, 2022
Check completeness of a binary tree
tree
Nov 6, 2022
Design an ordered stream
design
Nov 6, 2022
Jewels and stones
array-and-hashmap
Nov 6, 2022
Minimum number of vertices to reach all nodes
graph
Nov 6, 2022
Orderly queue
array-and-hashmap
Nov 6, 2022
Sort integers by the number of 1 bits
bit-manipulation
Nov 6, 2022
Counting words with a given prefix
array-and-hashmap
Nov 5, 2022
Find all numbers disappeared in an array
array-and-hashmap
Nov 5, 2022
Find pivot index
array-and-hashmap
Nov 5, 2022
Majority element
array-and-hashmap
Nov 5, 2022
Maximum number of balloons
array-and-hashmap
Nov 5, 2022
Merge in between linked lists
linked-list
Nov 5, 2022
Next greater element II
stack
Nov 5, 2022
Sum of beauty of all substrings
array-and-hashmap
Nov 5, 2022
The k strongest values in an array
array-and-hashmap
Nov 5, 2022
Word pattern
array-and-hashmap
Nov 5, 2022
Encode and decode tinyurl
design
Nov 4, 2022
Maximum profit in job scheduling
dynamic-programming intervals
Nov 4, 2022
Maximum score from removing stones
greedy
Nov 4, 2022
Partition array into three parts with equal sum
greedy
Nov 4, 2022
Reverse vowels of a string
stack
Nov 4, 2022
Longest palindrome by concatenating two letter words
array-and-hashmap
Nov 3, 2022
Smallest good base
math-and-geometry
Nov 3, 2022
Count items matching a rule
array-and-hashmap
Nov 2, 2022
Intersection of two arrays
intervals
Nov 2, 2022
Largest 3 same digit number in string
array-and-hashmap
Nov 2, 2022
Letter tile possibilities
backtracking
Nov 1, 2022
Minimum absolute difference in bst
tree
Nov 1, 2022
Minimum swaps to group all 1s together II
sliding-window
Nov 1, 2022
Where will the ball fall
array-and-hashmap
Nov 1, 2022
Find all possible recipes from given supplies
graph
Oct 31, 2022
Optimal division
math-and-geometry
Oct 31, 2022
Pairs of songs with total durations divisible by 60
math-and-geometry
Oct 31, 2022
Toeplitz matrix
array-and-hashmap
Oct 31, 2022
Divide array into equal pairs
array-and-hashmap
Oct 30, 2022
Shortest path in a grid with obstacles elimination
graph
Oct 30, 2022
Valid number
array-and-hashmap
Oct 30, 2022
Earliest possible day of full bloom
greedy
Oct 29, 2022
Most frequent number following key in an array
array-and-hashmap
Oct 29, 2022
Search in a binary search tree
tree
Oct 29, 2022
All elements in two binary search trees
tree
Oct 28, 2022
Fruit into baskets
sliding-window
Oct 28, 2022
Integer replacement
dynamic-programming
Oct 28, 2022
Max consecutive ones III
sliding-window
Oct 28, 2022
Max consecutive ones
sliding-window
Oct 28, 2022
Replace the substring for balanced string
sliding-window
Oct 28, 2022
Sum of number and its reverse
math-and-geometry
Oct 28, 2022
Count good numbers
math-and-geometry
Oct 27, 2022
Image overlap
array-and-hashmap
Oct 27, 2022
Predict the winner
dynamic-programming
Oct 27, 2022
XOR queries of a subarray
bit-manipulation
Oct 27, 2022
Groups of special equivalent strings
array-and-hashmap
Oct 26, 2022
Kth missing positive number
binary-search
Oct 26, 2022
Longest uploaded prefix
heap design
Oct 26, 2022
Maximum number of pairs in array
array-and-hashmap
Oct 26, 2022
Minesweeper
graph
Oct 26, 2022
Shortest bridge
graph
Oct 26, 2022
Check if two string arrays are equivalent
array-and-hashmap
Oct 25, 2022
Escape the ghosts
math-and-geometry
Oct 25, 2022
Reverse odd levels of binary tree
tree
Oct 25, 2022
Serialize and deserialize bst
tree design
Oct 25, 2022
Maximum length of a concatenated string with unique characters
array-and-hashmap
Oct 24, 2022
Open the lock
graph
Oct 24, 2022
Can place flowers
greedy
Oct 23, 2022
Integer break
dynamic-programming
Oct 23, 2022
Set mismatch
math-and-geometry
Oct 23, 2022
Destination city
array-and-hashmap
Oct 22, 2022
Minimum number of operations to convert time
greedy
Oct 22, 2022
Contains duplicate II
array-and-hashmap
Oct 21, 2022
Isomorphic strings
array-and-hashmap
Oct 21, 2022
Unique email addresses
array-and-hashmap
Oct 21, 2022
Maximum points you can obtain from cards
greedy
Oct 20, 2022
Number of valid move combinations on chessboard
backtracking
Oct 20, 2022
Map sum pairs
trie
Oct 19, 2022
Minimum operations to halve array sum
heap
Oct 19, 2022
Queries on a permutation with key
array-and-hashmap
Oct 19, 2022
Short encoding of words
trie
Oct 19, 2022
Reduction operations to make the array elements equal
greedy
Oct 18, 2022
Best sightseeing pair
array-and-hashmap
Oct 17, 2022
Convert binary number in a linked list to integer
linked-list
Oct 16, 2022
Delete leaves with a given value
tree
Oct 16, 2022
Find numbers with even number of digits
array-and-hashmap
Oct 16, 2022
Minimum difficulty of a job schedule
dynamic-programming
Oct 16, 2022
String compression II
dynamic-programming
Oct 15, 2022
Delete the middle node of a linked list
linked-list
Oct 14, 2022
Find missing observations
math-and-geometry
Oct 13, 2022
Find positive integer solution for a given equation
math-and-geometry
Oct 13, 2022
Shift 2d grid
math-and-geometry
Oct 13, 2022
Determine whether matrix can be obtained by rotation
array-and-hashmap
Oct 12, 2022
Largest perimeter triangle
math-and-geometry
Oct 12, 2022
Increasing triplet subsequence
greedy
Oct 11, 2022
Number of recent calls
queue design
Oct 11, 2022
Break a palindrome
array-and-hashmap
Oct 10, 2022
Convert bst to greater tree
tree
Oct 9, 2022
Find bottom left tree value
tree
Oct 9, 2022
Flip equivalent binary trees
tree
Oct 9, 2022
Frequency of the most frequent element
sliding-window
Oct 9, 2022
Guess number higher or lower
binary-search
Oct 9, 2022
Two sum IV input is a bst
tree
Oct 9, 2022
Find all anagrams in a string
array-and-hashmap
Oct 8, 2022
Find the index of the first occurrence in a string
sliding-window
Oct 8, 2022
Remove element
array-and-hashmap
Oct 8, 2022
Unique length 3 palindromic subsequences
array-and-hashmap
Oct 8, 2022
Reverse linked list II
linked-list
Oct 7, 2022
Search insert position
binary-search
Oct 7, 2022
Single threaded cpu
heap
Oct 7, 2022
Baseball game
stack
Oct 6, 2022
Is subsequence
two-pointers
Oct 6, 2022
Length of last word
two-pointers
Oct 6, 2022
Longest common prefix
array-and-hashmap
Oct 6, 2022
Merge two binary trees
tree
Oct 6, 2022
Replace elements with greatest element on right side
array-and-hashmap
Oct 6, 2022
Add one row to tree
tree
Oct 5, 2022
Add binary
bit-manipulation
Oct 4, 2022
Delete node in a linked list
linked-list
Oct 4, 2022
N-queens II
backtracking
Oct 4, 2022
Palindrome number
math-and-geometry
Oct 4, 2022
Remove covered intervals
intervals
Oct 4, 2022
Ugly number
math-and-geometry
Oct 4, 2022
Asteroid collision
stack
Oct 3, 2022
Minimum time to make rope colorful
greedy
Oct 3, 2022
Minimum difference between highest and lowest of k scores
sliding-window
Oct 2, 2022
Move zeroes
two-pointers
Oct 2, 2022
Number of dice rolls with target sum
dynamic-programming
Oct 2, 2022
Rotate array
two-pointers
Oct 2, 2022
Intersection of two linked lists
linked-list
Oct 1, 2022
Merge sorted array
two-pointers
Oct 1, 2022
Reverse string
two-pointers
Oct 1, 2022
Valid palindrome II
two-pointers
Oct 1, 2022
Destroying asteroids
greedy
Sep 30, 2022
Dota2 senate
greedy queue
Sep 30, 2022
Reveal cards in increasing order
queue
Sep 30, 2022
Word break II
trie backtracking
Sep 30, 2022
Design front middle back queue
queue design
Sep 29, 2022
Find the winner of the circular game
queue
Sep 29, 2022
Flood fill
graph
Sep 28, 2022
Product of the last k numbers
queue design
Sep 28, 2022
Bulb switcher
math-and-geometry
Sep 27, 2022
Design circular deque
queue design
Sep 27, 2022
Flatten nested list iterator
queue design
Sep 27, 2022
Push dominoes
two-pointers
Sep 27, 2022
Reverse string II
two-pointers
Sep 27, 2022
Strictly palindromic number
math-and-geometry
Sep 27, 2022
Satisfiability of equality equations
graph
Sep 26, 2022
Count nice pairs in an array
array-and-hashmap
Sep 25, 2022
Concatenation of consecutive binary numbers
bit-manipulation
Sep 23, 2022
Partition to k equal sum subsets
backtracking
Sep 23, 2022
Reverse words in a string III
array-and-hashmap
Sep 22, 2022
Sum of even numbers after queries
array-and-hashmap
Sep 21, 2022
Find duplicate file in system
array-and-hashmap
Sep 19, 2022
Number of sub arrays with odd sum
math-and-geometry
Sep 18, 2022
Deepest leaves sum
tree
Sep 17, 2022
Iterator for combination
design backtracking
Sep 17, 2022
Design an atm machine
greedy design
Sep 16, 2022
Finding pairs with a certain sum
design
Sep 16, 2022
Maximum score from performing multiplication operations
dynamic-programming
Sep 16, 2022
Minimum genetic mutation
graph
Sep 16, 2022
Minimum insertions to balance a parentheses string
stack greedy
Sep 16, 2022
Stone game
dynamic-programming
Sep 16, 2022
Find original array from doubled array
array-and-hashmap
Sep 15, 2022
Validate ip address
array-and-hashmap
Sep 15, 2022
Insufficient nodes in root to leaf paths
tree
Sep 14, 2022
Pseudo palindromic paths in a binary tree
backtracking tree
Sep 14, 2022
Spiral matrix II
math-and-geometry
Sep 14, 2022
Is graph bipartite
graph
Sep 13, 2022
Range sum query immutable
design
Sep 13, 2022
Reorder data in log files
array-and-hashmap
Sep 13, 2022
UTF-8 validation
bit-manipulation
Sep 13, 2022
Bag of tokens
two-pointers
Sep 12, 2022
Different ways to add parentheses
dynamic-programming
Sep 12, 2022
Elimination game
math-and-geometry
Sep 12, 2022
Longest word in dictionary
trie
Sep 12, 2022
Sender with largest word count
array-and-hashmap
Sep 12, 2022
Find the city with the smallest number of neighbors at a threshold distance
graph
Sep 11, 2022
Max sum of a pair with equal sum of digits
array-and-hashmap
Sep 11, 2022
Maximum difference between node and ancestor
tree
Sep 11, 2022
Maximum performance of a team
heap
Sep 11, 2022
Minimum falling path sum
dynamic-programming
Sep 11, 2022
Number of restricted paths from first to last node
graph
Sep 11, 2022
Best time to buy and sell stock II
dynamic-programming
Sep 10, 2022
Best time to buy and sell stock III
dynamic-programming
Sep 10, 2022
Best time to buy and sell stock IV
dynamic-programming
Sep 10, 2022
Coloring a border
graph
Sep 10, 2022
Count and say
array-and-hashmap
Sep 10, 2022
Island perimeter
graph
Sep 10, 2022
Maximum binary tree II
tree
Sep 10, 2022
Maximum binary tree
tree
Sep 10, 2022
Partition array according to given pivot
array-and-hashmap
Sep 10, 2022
Wildcard matching
dynamic-programming
Sep 10, 2022
Design a food rating system
heap design
Sep 9, 2022
Minimum number of swaps to make the string balanced
stack
Sep 9, 2022
Peeking iterator
design
Sep 9, 2022
Remove linked list elements
linked-list
Sep 9, 2022
The number of weak characters in the game
heap
Sep 9, 2022
Tuple with same product
array-and-hashmap
Sep 9, 2022
Build an array with stack operations
two-pointers
Sep 8, 2022
Combination sum III
backtracking
Sep 8, 2022
Find k closest elements
heap
Sep 8, 2022
Maximum erasure value
sliding-window
Sep 8, 2022
Minimum consecutive cards to pick up
sliding-window
Sep 8, 2022
Repeated dna sequences
sliding-window
Sep 8, 2022
Robot bounded in circle
math-and-geometry
Sep 8, 2022
Construct string from binary tree
tree
Sep 7, 2022
Keys and rooms
graph
Sep 7, 2022
Print binary tree
tree
Sep 7, 2022
Binary tree pruning
tree
Sep 6, 2022
Design a stack with increment operation
design stack
Sep 6, 2022
H-index II
array-and-hashmap
Sep 6, 2022
H-index
array-and-hashmap
Sep 6, 2022
Implement magic dictionary
trie design
Sep 6, 2022
Lexicographical numbers
graph
Sep 6, 2022
Linked list random node
linked-list
Sep 6, 2022
Merge nodes in between zeros
linked-list
Sep 6, 2022
Query kth smallest trimmed number
heap
Sep 6, 2022
Remove stones to minimize the total
heap
Sep 6, 2022
Replace words
trie
Sep 6, 2022
Reverse words in a string
array-and-hashmap
Sep 6, 2022
Seat reservation manager
heap
Sep 6, 2022
Smallest number in infinite set
heap
Sep 6, 2022
Sort an array
array-and-hashmap
Sep 6, 2022
Sort characters by frequency
array-and-hashmap
Sep 6, 2022
All ancestors of a node in a directed acyclic graph
graph
Sep 5, 2022
Basic calculator II
stack
Sep 5, 2022
Basic calculator III
stack
Sep 5, 2022
Basic calculator
stack
Sep 5, 2022
Battleships in a board
graph
Sep 5, 2022
Count primes
math-and-geometry
Sep 5, 2022
Course schedule IV
graph
Sep 5, 2022
House robber III
graph
Sep 5, 2022
Linked list cycle II
linked-list
Sep 5, 2022
Longest absolute file path
stack
Sep 5, 2022
Number of enclaves
graph
Sep 5, 2022
Path sum II
backtracking
Sep 5, 2022
Remove duplicate letters
stack
Sep 5, 2022
Restore ip addresses
backtracking
Sep 5, 2022
Search in rotated sorted array II
binary-search
Sep 5, 2022
Single number II
bit-manipulation
Sep 5, 2022
Single number III
bit-manipulation
Sep 5, 2022
Sort list
linked-list
Sep 5, 2022
Amount of time for binary tree to be infected
tree
Sep 4, 2022
Binary search tree iterator
tree
Sep 4, 2022
Binary tree level order traversal II
tree
Sep 4, 2022
Binary tree zigzag level order traversal
tree
Sep 4, 2022
Construct binary tree from inorder and postorder traversal
tree
Sep 4, 2022
Convert sorted list to binary search tree
tree
Sep 4, 2022
Count complete tree nodes
tree
Sep 4, 2022
delete-node-in-a-bst
tree
Sep 4, 2022
Evaluate division
graph
Sep 4, 2022
Populating next right pointers in each node II
tree
Sep 4, 2022
Populating next right pointers in each node
tree
Sep 4, 2022
Recover binary search tree
tree
Sep 4, 2022
Unique binary search trees II
dynamic-programming
Sep 4, 2022
Unique binary search trees
dynamic-programming
Sep 4, 2022
Verify preorder serialization of a binary tree
stack
Sep 4, 2022
Vertical order traversal of a binary tree
tree
Sep 4, 2022
Balance a binary search tree
tree
Sep 3, 2022
Decode string
stack
Sep 3, 2022
Design underground system
design
Sep 3, 2022
Equal row and column pairs
array-and-hashmap
Sep 3, 2022
Gray code
bit-manipulation
Sep 3, 2022
Largest number
array-and-hashmap
Sep 3, 2022
Minimum moves to equal array elements II
math-and-geometry
Sep 3, 2022
Numbers with same consecutive differences
backtracking
Sep 3, 2022
Sell diminishing valued colored balls
heap
Sep 3, 2022
Average of levels in binary tree
tree
Sep 2, 2022
Minimum time difference
intervals
Sep 2, 2022
Reachable nodes with restrictions
graph
Sep 2, 2022
Sudoku solver
backtracking
Sep 2, 2022
Sum root to leaf numbers
tree
Sep 2, 2022
4sum
array-and-hashmap
Sep 1, 2022
Bitwise and of numbers range
bit-manipulation
Sep 1, 2022
Clumsy factorial
math-and-geometry
Sep 1, 2022
Insertion sort list
linked-list
Sep 1, 2022
Integer to roman
array-and-hashmap
Sep 1, 2022
Minimum height trees
graph
Sep 1, 2022
Minimum moves to equal array elements
math-and-geometry
Sep 1, 2022
N-ary tree level order traversal
tree
Sep 1, 2022
Next permutation
array-and-hashmap
Sep 1, 2022
Simple bank system
array-and-hashmap
Sep 1, 2022
Zigzag conversion
array-and-hashmap
Sep 1, 2022
Continuous subarray sum
array-and-hashmap
Aug 31, 2022
Rearrange words in a sentence
array-and-hashmap
Aug 31, 2022
Subarray sum equals k
array-and-hashmap
Aug 31, 2022
Furthest building you can reach
heap
Aug 30, 2022
Get equal substrings within budget
sliding-window
Aug 30, 2022
Maximum xor of two numbers in an array
bit-manipulation
Aug 30, 2022
Minimum moves to make array complementary
array-and-hashmap
Aug 30, 2022
Remove duplicates from sorted list II
linked-list
Aug 30, 2022
Remove duplicates from sorted list
linked-list
Aug 30, 2022
All paths from source to target
backtracking
Aug 29, 2022
Divide two integers
math-and-geometry
Aug 29, 2022
Minimum size subarray sum
sliding-window
Aug 29, 2022
Number of islands
graph
Aug 29, 2022
Number of provinces
graph
Aug 29, 2022
Remove duplicates from sorted array II
array-and-hashmap
Aug 29, 2022
Remove duplicates from sorted array
array-and-hashmap
Aug 29, 2022
Simplify path
stack
Aug 29, 2022
Combinations
backtracking
Aug 28, 2022
First missing positive
array-and-hashmap
Aug 28, 2022
Game of life
array-and-hashmap
Aug 28, 2022
Sort the matrix diagonally
math-and-geometry
Aug 28, 2022
Unique paths II
dynamic-programming
Aug 28, 2022
Validate stack sequences
stack
Aug 28, 2022
3sum closest
array-and-hashmap
Aug 27, 2022
Check if a string contains all binary codes of size k
array-and-hashmap
Aug 27, 2022
Interval list intersections
intervals
Aug 27, 2022
Number of smooth descent periods of a stock
dynamic-programming
Aug 27, 2022
Remove k digits
stack
Aug 27, 2022
Swap nodes in pairs
linked-list
Aug 27, 2022
Minimum number of flips to make the binary string alternating
greedy
Aug 26, 2022
Reordered power of 2
bit-manipulation
Aug 26, 2022
Compare version numbers
two-pointers
Aug 25, 2022
Count servers that communicate
graph
Aug 25, 2022
Ransom note
array-and-hashmap
Aug 25, 2022
Power of three
math-and-geometry
Aug 24, 2022
Rotate list
linked-list
Aug 24, 2022
Palindrome linked list
linked-list
Aug 23, 2022
Check if a word occurs as a prefix of any word in a sentence
array-and-hashmap
Aug 22, 2022
Minimum deletions to make string balanced
dynamic-programming
Aug 22, 2022
Power of four
math-and-geometry
Aug 22, 2022
Check if the sentence is pangram
array-and-hashmap
Aug 21, 2022
Construct binary tree from preorder and postorder traversal
tree
Aug 21, 2022
Cousins in binary tree
tree
Aug 21, 2022
Number of good ways to split a string
array-and-hashmap
Aug 21, 2022
Stamping the sequence
greedy
Aug 21, 2022
Minimum number of refueling stops
heap
Aug 20, 2022
Number of pairs of strings with concatenation equal to target
array-and-hashmap
Aug 20, 2022
The k weakest rows in a matrix
heap
Aug 20, 2022
Design parking system
array-and-hashmap design
Aug 19, 2022
Split array into consecutive subsequences
array-and-hashmap
Aug 19, 2022
Reduce array size to the half
array-and-hashmap
Aug 18, 2022
Strange printer
dynamic-programming
Aug 18, 2022
Beautiful arrangement
backtracking
Aug 17, 2022
Unique morse code words
array-and-hashmap
Aug 17, 2022
Find triangular sum of an array
math-and-geometry
Aug 16, 2022
First unique character in a string
array-and-hashmap
Aug 16, 2022
N-th tribonacci number
dynamic-programming
Aug 16, 2022
String to integer atoi
math-and-geometry
Aug 16, 2022
Prime number of set bits in binary representation
bit-manipulation
Aug 15, 2022
Roman to integer
math-and-geometry
Aug 15, 2022
Next greater element I
stack
Aug 14, 2022
Word ladder II
graph
Aug 14, 2022
Design circular queue
queue design
Aug 13, 2022
Distinct subsequences
dynamic-programming
Aug 13, 2022
Edit distance
dynamic-programming
Aug 13, 2022
Regular expression matching
dynamic-programming
Aug 13, 2022
Stream of characters
trie
Aug 13, 2022
Substring with concatenation of all words
sliding-window
Aug 13, 2022
Best time to buy and sell stock with cooldown
dynamic-programming
Aug 12, 2022
Interleaving string
dynamic-programming
Aug 12, 2022
Longest common subsequence
dynamic-programming
Aug 12, 2022
Longest increasing path in a matrix
dynamic-programming
Aug 12, 2022
Redundant connection
graph
Aug 12, 2022
Walls and gates
graph
Aug 12, 2022
Word ladder
graph
Aug 12, 2022
Pacific atlantic water flow
graph
Aug 11, 2022
Partition equal subset sum
dynamic-programming
Aug 11, 2022
Surrounded regions
graph
Aug 11, 2022
Convert sorted array to binary search tree
tree
Aug 10, 2022
Decode ways
dynamic-programming
Aug 10, 2022
Maximum product subarray
dynamic-programming
Aug 10, 2022
Partition labels
greedy
Aug 10, 2022
Word break
dynamic-programming
Aug 10, 2022
Binary trees with factors
dynamic-programming
Aug 9, 2022
Hand of straights
greedy
Aug 9, 2022
Longest palindromic substring
dynamic-programming
Aug 9, 2022
Merge triplets to form target triplet
greedy
Aug 9, 2022
Valid parenthesis string
greedy
Aug 9, 2022
Clone graph
graph
Aug 8, 2022
Gas station
greedy
Aug 8, 2022
House robber II
dynamic-programming
Aug 8, 2022
Longest increasing subsequence
dynamic-programming
Aug 8, 2022
Palindromic substrings
dynamic-programming
Aug 8, 2022
Count vowels permutation
dynamic-programming
Aug 7, 2022
Detect squares
math-and-geometry
Aug 7, 2022
Find median from data stream
heap design
Aug 7, 2022
Insert interval
intervals
Aug 7, 2022
Minimum interval to include each query
intervals
Aug 7, 2022
Multiply strings
math-and-geometry
Aug 7, 2022
Non overlapping intervals
intervals
Aug 7, 2022
Pow(x, n)
math-and-geometry
Aug 7, 2022
Rotate image
math-and-geometry
Aug 7, 2022
Set matrix zeroes
math-and-geometry
Aug 7, 2022
Spiral matrix
math-and-geometry
Aug 7, 2022
Binary tree maximum path sum
tree
Aug 6, 2022
Design twitter
heap design
Aug 6, 2022
Kth smallest element in a bst
tree
Aug 6, 2022
Letter combinations of a phone number
backtracking
Aug 6, 2022
Merge k sorted lists
linked-list
Aug 6, 2022
Poor pigs
math-and-geometry
Aug 6, 2022
Reverse nodes in k group
linked-list
Aug 6, 2022
Serialize and deserialize binary tree
tree design
Aug 6, 2022
Validate binary search tree
tree
Aug 6, 2022
Coin change 2
dynamic-programming
Aug 5, 2022
Combination sum II
backtracking
Aug 5, 2022
Combination sum IV
dynamic-programming
Aug 5, 2022
Combination sum
backtracking
Aug 5, 2022
LRU cache
linked-list design
Aug 5, 2022
Find minimum in rotated sorted array
binary-search
Aug 4, 2022
Find the duplicate number
linked-list
Aug 4, 2022
Median of two sorted arrays
binary-search
Aug 4, 2022
Mirror reflection
math-and-geometry
Aug 4, 2022
Search in rotated sorted array
binary-search
Aug 4, 2022
Minimum window substring
sliding-window
Aug 3, 2022
My calendar I
tree
Aug 3, 2022
Sliding window maximum
sliding-window
Aug 3, 2022
Find eventual safe states
graph
Aug 2, 2022
Kth smallest element in a sorted matrix
heap
Aug 2, 2022
Permutation in string
sliding-window
Aug 2, 2022
Add two numbers
linked-list
Aug 1, 2022
Copy list with random pointer
linked-list
Aug 1, 2022
Koko eating bananas
binary-search
Aug 1, 2022
Reorder list
linked-list
Aug 1, 2022
Climbing stairs
dynamic-programming
Jul 31, 2022
Largest number at least twice of others
array-and-hashmap
Jul 31, 2022
Min cost climbing stairs
dynamic-programming
Jul 31, 2022
Perfect squares
dynamic-programming
Jul 31, 2022
reverse-integer
bit-manipulation
Jul 31, 2022
Sum of two integers
math-and-geometry
Jul 31, 2022
Car fleet
stack
Jul 30, 2022
Daily temperatures
stack
Jul 30, 2022
Largest rectangle in histogram
stack
Jul 30, 2022
Top k frequent words
heap
Jul 30, 2022
Word search II
trie
Jul 30, 2022
Word subsets
array-and-hashmap
Jul 30, 2022
Find and replace pattern
array-and-hashmap
Jul 29, 2022
Generate parentheses
stack
Jul 29, 2022
Longest consecutive sequence
array-and-hashmap
Jul 29, 2022
Longest repeating character replacement
sliding-window
Jul 29, 2022
Search suggestions system
array-and-hashmap
Jul 29, 2022
Happy number
math-and-geometry
Jul 28, 2022
Min cost to connect all points
graph
Jul 28, 2022
Palindrome partitioning
backtracking
Jul 28, 2022
reconstruct-itinerary
graph
Jul 28, 2022
Swim in rising water
graph
Jul 28, 2022
Flatten binary tree to linked list
tree
Jul 27, 2022
Alien dictionary
graph
Jul 26, 2022
Cheapest flights within k stops
graph
Jul 26, 2022
Count good nodes in binary tree
tree
Jul 26, 2022
Lowest common ancestor of a binary tree
tree
Jul 26, 2022
Network delay time
graph
Jul 26, 2022
Verifying an alien dictionary
graph
Jul 26, 2022
Brust balloons
dynamic-programming
Jul 25, 2022
Find first and last position of element in sorted array
binary-search
Jul 25, 2022
Number of connected components in an undirected graph
graph
Jul 25, 2022
Trapping rain water
two-pointers
Jul 25, 2022
Implement queue using stacks
queue design
Jul 24, 2022
Longest substring without repeating characters
sliding-window
Jul 24, 2022
Permutations II
backtracking
Jul 24, 2022
Permutations
backtracking
Jul 24, 2022
Search a 2d matrix II
binary-search
Jul 24, 2022
Search a 2d matrix
binary-search
Jul 24, 2022
Subsets II
backtracking
Jul 24, 2022
Word search
backtracking
Jul 24, 2022
3Sum
two-pointers
Jul 23, 2022
Design add and search words data structure
trie design
Jul 23, 2022
K closest points to origin
heap
Jul 23, 2022
Kth largest element in an array
heap
Jul 23, 2022
Last stone weight
heap
Jul 23, 2022
Meeting rooms II
intervals heap
Jul 23, 2022
Plus one
math-and-geometry
Jul 23, 2022
Remove nth node from end of list
linked-list
Jul 23, 2022
Subsets
backtracking
Jul 23, 2022
Task scheduler
heap
Jul 23, 2022
Time based key value store
binary-search design
Jul 23, 2022
Jump game II
greedy
Jul 22, 2022
Jump game
greedy
Jul 22, 2022
N-queens
backtracking
Jul 22, 2022
Partition list
linked-list
Jul 22, 2022
Fibonacci number
dynamic-programming
Jul 21, 2022
Graph valid tree
graph
Jul 21, 2022
Implement stack using queues
queue design
Jul 21, 2022
Implement trie prefix tree
trie design
Jul 21, 2022
Maximum subarray
greedy
Jul 21, 2022
Meeting rooms
intervals
Jul 21, 2022
Merge intervals
intervals
Jul 21, 2022
Prime number of set bits in binary representation
math-and-geometry
Jul 21, 2022
Binary tree inorder traversal
tree
Jul 20, 2022
Binary tree postorder traversal
tree
Jul 20, 2022
Binary tree preorder traversal
tree
Jul 20, 2022
Kth largest element in a stream
heap
Jul 20, 2022
N-ary tree postorder traversal
tree
Jul 20, 2022
N-ary tree preorder traversal
tree
Jul 20, 2022
Binary search
binary-search
Jul 19, 2022
Evaluate reverse polish notation
stack
Jul 19, 2022
Linked list cycle
linked-list
Jul 19, 2022
Min stack
stack design
Jul 19, 2022
Pascals triangle
array-and-hashmap
Jul 19, 2022
Path sum
tree
Jul 19, 2022
Encode and decode string
array-and-hashmap
Jul 18, 2022
Find largest value in each tree row
tree
Jul 18, 2022
Lowest common ancestor of a binary search tree
tree
Jul 18, 2022
Minimum path sum
dynamic-programming
Jul 18, 2022
Best time to buy and sell stock
sliding-window
Jul 17, 2022
Coin change
dynamic-programming
Jul 17, 2022
House robber
dynamic-programming
Jul 17, 2022
Target sum
dynamic-programming
Jul 17, 2022
Unique paths
dynamic-programming
Jul 17, 2022
Number of 1 bits
bit-manipulation
Jul 16, 2022
Course schedule II
graph
Jul 16, 2022
Course schedule
graph
Jul 16, 2022
Missing number
bit-manipulation
Jul 16, 2022
Reverse bits
bit-manipulation
Jul 16, 2022
Valid parentheses
stack
Jul 16, 2022
Container with most water
two-pointers
Jul 15, 2022
Merge two sorted list
linked-list
Jul 15, 2022
Reverse linked list
linked-list
Jul 15, 2022
Balanced binary tree
tree
Jul 14, 2022
Construct binary tree from preorder and inorder traversal
tree
Jul 14, 2022
Diameter of binary tree
tree
Jul 14, 2022
Invert binary tree
tree
Jul 14, 2022
Maximum depth of binary tree
tree
Jul 14, 2022
Maximum depth of n-ary tree
tree
Jul 14, 2022
Same tree
tree
Jul 14, 2022
Subtree of another tree
tree
Jul 14, 2022
Two sum II - input array is sorted
two-pointers
Jul 14, 2022
Binary tree level order traversal
tree
Jul 13, 2022
Number of 1 bits
bit-manipulation
Jul 13, 2022
Product of array except self
array-and-hashmap
Jul 13, 2022
Single number
bit-manipulation
Jul 13, 2022
Valid palindrome
two-pointers
Jul 13, 2022
Valid sudoku
array-and-hashmap
Jul 13, 2022
Group anagrams
array-and-hashmap
Jul 12, 2022
Rotting oranges
graph
Jul 12, 2022
Top k frequent element
array-and-hashmap
Jul 12, 2022
Valid anagram
array-and-hashmap
Jul 12, 2022
Binary tree right side view
tree
Jul 11, 2022
Max area of island
graph
Jul 11, 2022
Contains duplicate
array-and-hashmap
Jul 10, 2022
Two sum
array-and-hashmap
Jul 10, 2022