Interactive visualizations for data structures and algorithms
Sort an array using the bubble sort algorithm
Sort an array using the selection sort algorithm
Sort an array using the insertion sort algorithm
Sort an array using the bottom-up iterative merge sort algorithm
Sort elements by distributing them into buckets
Sort elements by counting occurrences of each value
Sort an array using a max-heap data structure
Find the maximum difference between successive elements after sorting
Sort integers digit by digit from least to most significant
Sort an array using diminishing increment sort
Sort an array using an efficient comparison-based algorithm
Move all zeroes to end while maintaining relative order
Find the majority element in an array
Remove duplicates from a sorted array
Find maximum profit from single buy and sell transaction
Rotate an array by k steps
Calculate product of array except self
Find maximum profit from multiple buy and sell transactions
Find number of zero-filled subarrays
Find increasing triplet subsequence
Find the first missing positive integer in an array
Find minimum boxes needed to redistribute apples
Check if any value appears at least twice in the array
Find if there exist indices i, j with bounded index and value difference
Count substrings with equal numbers of 0s and 1s
Find all numbers missing from 1 to n in an array
Find all elements appearing more than n/3 times
Find the maximum number of consecutive 1s in a binary array
Swap two digits at most once to get the maximum valued number
Find the missing number in range 0 to n
Find missing ranges between lower and upper bounds
Remove all occurrences of a value in-place
Find the number that occurs twice and the missing number
Interleave two halves of an array in a specific pattern
Find the shortest subarray that when sorted makes the whole array sorted
Return the smallest sorted list of ranges covering all numbers in the array
Find the third distinct maximum number in an array
Answer range queries efficiently using Mo's offline algorithm
Check if s is a subsequence of t
Check if a string is a valid palindrome
Find the longest common prefix in an array of strings
Convert a string into a zigzag pattern across rows and read row by row
Reverse the words in a string
Check if a string can be constructed by repeating a substring
Find minimum repeats of a to contain b as substring
Count distinct substrings using a Trie
Find the longest prefix that is also a suffix using KMP
Find shortest palindrome by adding characters to the front
Find the longest substring that occurs at least twice using binary search and Rabin-Karp
Add bold tags around substrings that match any word in a dictionary
Generate the nth term of the count-and-say sequence
Design an algorithm to encode and decode a list of strings
Find the longest common prefix length among pairs from two arrays
Convert a non-negative integer to its English words representation
Search for a pattern in a text using the Knuth-Morris-Pratt algorithm
Return the length of the last word in a string
Find the longest substring where every letter appears in both cases
Count how many words are subsequences of a given string
Determine if two strings are exactly one edit apart
Find all pairs of distinct indices whose concatenation is a palindrome
Search for a pattern in text using rolling hash
Check if one string is a rotation of another
Make the largest lexicographic special binary string by swapping
Compress a character array using counts of repeated characters
Format text so that each line has exactly maxWidth characters
Determine if a word matches a given abbreviation
Find query words within two edit operations of any dictionary word
Build Z-array for pattern matching in linear time
Find the single number in an array where every other number appears twice
Count the number of 1 bits in the binary representation of a number
Find the two numbers in an array where every other number appears twice
Find the number of positions where two integers differ in bits
Count the number of set bits in an integer
Reverse bits of a 32-bit unsigned integer
Find the element that appears once when others appear three times
Calculate the sum of two integers without using + or -
Check if a ransom note can be constructed from a magazine
Find the number of good pairs in an array
Find the maximum number of balloons in a string
Check if an array contains duplicate elements within k distance
Check if two strings are isomorphic
Group anagrams together
Reorganize a string so that no two adjacent characters are the same
Find the longest consecutive sequence in an array
Find the number of good ways to split a string
Find two numbers in an array that add up to a target
Check if two strings are close by applying allowed operations
Design a URL shortener service
Find the first non-repeating character in a string
Group strings that belong to the same shifting sequence
Determine if a number eventually reaches 1 under repeated digit-square summing
Design a data structure supporting O(1) insert, delete, and random access
Find the length of the longest palindrome from given characters
Determine if two strings are anagrams of each other
Determine if a string follows a given pattern
Merge two sorted arrays into a single sorted array
Find two numbers that add up to target using two pointers on sorted array
Find two lines that form a container with maximum water capacity
Find all unique triplets that sum to zero
Calculate total water trapped between elevation bars after raining
Compare two strings after processing backspace characters
Remove duplicates in-place allowing at most two of each element
Reverse a string in-place using two pointers
Return sorted array of squares of each number
Merge two strings by alternating their characters
Check if a string can be a palindrome after deleting at most one character
Find longest subarray with equal number of 0s and 1s using hash map
Check if array has subarray (size ≥ 2) with sum that is multiple of k
Find subarrays with sum equal to target using prefix sums
Find subarrays with sum divisible by k using prefix sums
Compute running sum of each element in an array
Find the index where the sum of left elements equals the sum of right elements
Find the year with the highest population using a difference array
Apply range increment updates and return the final array
Find maximum average of contiguous subarray of length k using sliding window
Check if s1 is a permutation of s2 using sliding window
Find all anagrams of s1 in s2 using sliding window
Find minimal length subarray with sum ≥ target using variable-size sliding window
Find max consecutive 1s after flipping at most k zeros using sliding window
Find the length of the longest substring without repeating characters
Find the minimum window in string that contains all characters of target
Count subarrays where max-min difference is at most 2
Count subarrays with exactly k odd numbers
Count subarrays where min is minK and max is maxK
Find the maximum frequency of any element after k increments
Pick the maximum number of fruits using two baskets
Find the longest substring with at most k character replacements
Find the longest substring where every character repeats at least k times
Find the longest substring containing at most k distinct characters
Find the longest substring with at most two distinct characters
Find the maximum number of vowels in any substring of length k
Pick k cards from the front or back of an array to maximize points
Find the maximum sum of a subarray of length k with all distinct elements
Find the minimum window in S that contains T as a subsequence
Partition array into minimum subsequences with max-min difference at most k
Count subarrays where the product of all elements is less than k
Count subarrays with exactly k distinct integers
Find all starting indices of substring(s) that are a concatenation of all words
Find the contiguous subarray with the largest sum (Kadane's Algorithm)
Find the contiguous subarray with the largest product (Kadane's Algorithm)
Find the best sightseeing pair in an array
Find the maximum absolute sum of any subarray
Find the maximum subarray sum after deleting at most one element
Find the maximum subarray sum in a circular array
Traverse matrix in spiral order from outer to inner layers
Rotate n×n matrix 90 degrees clockwise using transpose then reverse
Set entire row and column to zero if element is zero using O(1) space
Traverse a matrix diagonally
Return the transpose of a given matrix
Determine if a 9x9 Sudoku board is valid
Simulate Conway's Game of Life on a board
Apply range increment operations on a matrix using prefix sums
Find the middle node of a linked list
Remove the nth node from the end of a linked list
Reverse a singly linked list using three pointers
Reverse a sublist from position left to right in one pass
Reverse nodes in k-sized groups using iterative in-place reversal
Remove all nodes with duplicate values from a sorted linked list
Merge two sorted linked lists into a single sorted linked list
Detect cycle and find entry point using Floyd's algorithm
Swap every two adjacent nodes in a linked list
Partition a linked list around a value x
Rotate a linked list to the right by k places
Add two numbers represented by linked lists
Deep copy a linked list with random pointers using three-pass interleaving
Flatten a multilevel doubly linked list by inserting child lists inline
Find the node where two linked lists intersect using two pointers
Add two numbers represented as linked lists where digits are stored forward
Convert a sorted linked list to a height-balanced binary search tree
Delete the middle node of a linked list
Delete a node in a linked list given only access to that node
Implement a linked list with get, add, and delete operations
Insert a node into a linked list
Insert a value into a sorted circular linked list
Design a data structure for a least recently used cache
Replace nodes from index a to b in list1 with list2
Group odd-indexed nodes before even-indexed nodes in a linked list
Check whether a linked list is a palindrome
Delete all duplicates from a sorted linked list
Reorder linked list to interleave nodes from front and back
Sort a linked list in O(n log n) time using merge sort
Determine if a string of brackets is properly balanced using a stack
Remove all adjacent duplicates in a string using a stack
Remove duplicate letters from a string to form the lexicographically smallest string
Remove stars from a string
Evaluate a reverse polish notation expression using a stack
Evaluate a basic calculator expression using a stack
Find the longest valid parentheses substring using a stack
Find the next greater element for each element in nums1 using a stack
Find how many days until a warmer temperature using monotonic stack
Find the 132 pattern in an array using a stack
Find the number of visible people in a queue using a stack
Find the largest rectangle area in a histogram using a monotonic stack
Simulate collisions between asteroids moving in opposite directions
Calculate a baseball game score based on a list of operations
Evaluate a basic arithmetic expression string with + and -
Find buildings that have an ocean view to the right
Find the number of car fleets that arrive at a destination
Create the maximum number from two arrays with length k
Decode an encoded string with nested repetition patterns
Design a text editor with add, delete, and cursor movement operations
Implement browser history with visit, back, and forward operations
Calculate the exclusive time of each function from call logs
Find the most competitive subsequence of length k
Implement a FIFO queue using only two stacks
Implement a LIFO stack using only queues
Design a stack that supports push, pop, and retrieving the maximum element
Design a stack that pops the most frequent element
Find the maximum nesting depth of parentheses in a string
Maximize score by removing substrings ab and ba
Find the maximum width ramp in an array
Design a stack that supports retrieving the minimum element in O(1)
Find the minimum number of parentheses to add to make a string valid
Remove minimum parentheses to make the string valid
Find the next greater element for each element in a circular array
Find the next greater value for each node in a linked list
Calculate the price span for a stock on each day
Remove the minimum number of invalid parentheses to make the string valid
Remove k digits from a number to make it as small as possible
Simplify a Unix-style file path
Check if a string with *, (, ) can be valid by replacing * appropriately
Check if given pushed and popped sequences could result from a stack
Arrange deck so cards are revealed in increasing order using queue simulation
Find the maximum score of a jump game using a queue
Find maximum in each sliding window using monotonic deque
Find the maximum value of equation using a queue
Design a double-ended circular queue with fixed capacity
Design a circular queue with enqueue, dequeue, and peek operations
Design a hit counter that counts hits in the last 5 minutes
Find the first unique number in a stream
Design a logger that limits duplicate log messages to once per 10 seconds
Calculate the moving average of the last n numbers from a stream
Count requests in the last 3000 milliseconds
Find how long it takes for a person at position k to buy all their tickets
Sort an array of 0s, 1s, and 2s using the quickselect algorithm
Find the kth largest element in an array using a min-heap
Find the insertion position of a target in a sorted array using binary search
Find target in rotated sorted array using modified binary search
Find the peak element in a sorted array using binary search
Find the minimum element in a rotated sorted array using binary search
Find target in sorted 2D matrix using binary search
Search for a target value in a sorted array
Find the minimum ship capacity to deliver all packages within d days
Find the starting and ending position of a target in a sorted array
Find the first occurrence of a target in a sorted array
Find a target in a mountain array using binary search
Find the k closest integers to a target in a sorted array
Find the k-th smallest absolute difference among all pairs
Find the smallest letter in a circular sorted list greater than the target
Find the first bad version using binary search
Guess a number between 1 and n using binary search
Find the minimum eating speed to finish all bananas within h hours
Maximize the minimum magnetic force between balls placed in baskets
Find the minimum days to make m bouquets from the garden
Assign jobs to workers to maximize total profit
Search for a target in a matrix sorted row and column-wise
Search for a target in a rotated sorted array that may contain duplicates
Design an array supporting snapshots and queries on past states
Split array into m subarrays to minimize the largest subarray sum
Design a key-value store supporting time-stamped get and set operations
Determine if a number is a perfect square without using sqrt
Generate all subsets using recursive backtracking with decision tree
Generate all permutations by choosing unused elements recursively
Find all combinations that sum to a target using reusable elements
Find all unique combinations that sum to a target with no reuse
Find all combinations of k numbers that sum to n
Generate all combinations of k numbers from 1 to n
Generate all combinations of well-formed parentheses
Generate all possible letter combinations from a phone number
Place n queens on an n×n chessboard so no two queens attack each other
Partition a string into all possible palindrome substrings
Generate all unique permutations of a collection that may have duplicates
Return all valid IP addresses that can be formed from a string
Generate all subsets of a collection that may have duplicates
Solve a Sudoku puzzle by filling in the empty cells
Walk over every non-obstacle square exactly once from start to end
Find if a word exists in a grid by searching adjacent cells
Build all word squares from a given set of words
Traverse tree level by level using BFS and queue
Traverse tree right side view using BFS and queue
Traverse tree level by level in zigzag pattern using BFS and queue
Connect nodes at same level using BFS with queue
Traverse tree preorder using DFS and stack
Check if two binary trees are identical
Check if a binary tree is symmetric
Find all root-to-leaf paths in a binary tree
Convert a sorted array to a binary search tree
Find the maximum difference between a node and its ancestor in a binary tree
Count downward paths that sum to target using prefix sums and DFS
Traverse tree inorder using DFS and stack
Find the minimum distance between any two nodes in a BST
Check if a binary tree satisfies BST properties using recursive DFS
Find the kth smallest element in a BST using iterative inorder traversal
Traverse tree postorder using DFS and stack
Invert a binary tree using DFS and stack
Find the diameter of a binary tree using recursion
Find the lowest common ancestor of two nodes in a binary tree using recursion
Find duplicate subtrees in a binary tree using serialization
Flatten tree to right-skewed linked list in-place using Morris Traversal
Distribute coins to each node in a binary tree so that every node has exactly one coin
Find maximum amount of money the thief can rob from a binary tree
Find maximum path sum in tree where path can start and end at any node
Find minimum number of cameras to cover all nodes in a binary tree
Return the average value of each level of a binary tree
Determine if a binary tree is height-balanced
Return the boundary values of a binary tree in counter-clockwise order
Determine if a binary tree is a complete binary tree
Build a binary tree from its inorder and postorder traversals
Build a binary tree from its preorder and inorder traversals
Construct a quad tree from a 2D grid
Count nodes in a complete binary tree in less than O(n)
Count nodes where no node on the path from root has a greater value
Delete nodes from a binary tree and return the remaining forest
Find the longest path in a tree where all nodes have the same value
Construct a maximum binary tree from an array
Find the maximum width of a binary tree across all levels
Find all root-to-leaf paths that sum to a target
Connect each node to its next right node at the same level
Encode a binary tree to a string and decode it back
Find the shortest path between two nodes in a binary tree
Check if a tree is a subtree of another tree
Find the sum of all left leaves in a binary tree
Calculate the total sum of all root-to-leaf numbers
Traverse a binary tree column by column from left to right
Trim BST to range [low, high] using recursive pruning and restructuring
Convert an unbalanced BST into a balanced BST
Implement an in-order iterator for a BST with O(h) memory
Find the value in a BST closest to a given target
Construct a BST from its preorder traversal
Convert a BST to a sorted circular doubly-linked list in-place
Delete a node with a given key from a binary search tree
Delete a node in a BST and return the root
Find the in-order successor of a node in a BST
Find the in-order successor when nodes have parent pointers
Insert a value into a binary search tree
Insert a value into a BST and return the root
Find the largest subtree in a binary tree that is a valid BST
Find the lowest common ancestor of two nodes in a BST
Find the minimum absolute difference between any two nodes in a BST
Find the sum of all node values in a BST within a given range
Recover a BST where two nodes were swapped by mistake
Find the node with the given value in a BST
Generate product suggestions for each prefix using binary search
Find all words from dictionary in board using Trie and DFS backtracking
Design a data structure that supports adding and searching with wildcards
Design an in-memory file system with ls, mkdir, addContentToFile, and readContentFromFile
Design a search autocomplete system that returns the top 3 historical hot sentences
Implement a trie with insert, search, and startsWith operations
Implement a prefix tree supporting insert, search, and startsWith
Find the longest word that can be built one character at a time
Find the maximum XOR of any two numbers in an array using a trie
Replace words in a sentence with their root from a dictionary
Detect words from a dictionary in a stream of characters
Sort characters by frequency using min-heap
Find furthest building reachable with bricks and ladders using min-heap
Find top k frequent elements using min-heap
Find median from data stream using two heaps
Maximize capital by selecting k most profitable projects using max-heap
Find k closest points to origin using max-heap to track distances
Find k pairs with smallest sums using min-heap
Merge k sorted lists using min-heap
Design a data structure with O(1) inc, dec, getMaxKey, and getMinKey
Find the free time intervals for all employees
Find the kth largest element in a stream of numbers
Find the kth largest integer in a string array
Simulate smashing the two heaviest stones until one remains
Design a least-frequently-used cache with O(1) get and put
Pick at most k engineers to maximize the team's performance
Connect all sticks at minimum cost using a greedy approach with a min-heap
Hire exactly k workers with minimum total wage
Find the minimum refueling stops to reach the target
Assign tasks to the smallest available server greedily
Simulate a single-threaded CPU scheduling tasks by shortest processing time
Find the skyline formed by a collection of buildings
Find the median of each sliding window of size k
Find the smallest range that includes at least one number from each list
Track stock prices and query current, maximum, and minimum prices
Find the minimum time to execute all tasks with a cooldown constraint
Return the k most frequent words sorted by frequency and lexicographic order
Pick at most two non-overlapping events to maximize the sum of values
Merge all overlapping intervals on a timeline
Insert a new interval into a list of intervals
Find minimum arrows needed to burst all balloons using greedy algorithm
Find maximum number of non-overlapping intervals using greedy algorithm
Find kth smallest element using binary search on value range
Attend the maximum number of events using a greedy min-heap approach
Prevent flooding by drying lakes before they overflow
Determine if a car can pick up and drop off all passengers
Find the minimum heater radius to cover all houses
Find the intersection of two lists of closed intervals
Determine if a person can attend all meetings
Find the minimum number of conference rooms required
Find the room that held the most meetings
Find the earliest available slot for a meeting of given duration
For each query, find the size of the smallest interval that contains it
Implement a calendar that books events without double-booking
Implement a calendar allowing at most double-booking
Remove intervals that are covered by another interval in the list
Find the minimum set whose intersection with every interval has size at least 2
Find minimum jumps to reach the end using greedy BFS approach
Find starting gas station to complete circular route using greedy algorithm
Assign cookies to children to maximize the number of content children
Find the minimum number of boats to carry all people
Distribute candy to children with minimum total using ratings
Determine if you can reach the last index from the first
Determine if you can reach the last index using jump constraints
Construct the longest string where no three consecutive characters are the same
Maximize the sum of a matrix by flipping signs of adjacent elements
Find the minimum deletions to make all character frequencies unique
Partition a string into as many parts as possible so each letter appears in at most one part
Reconstruct a queue based on people's heights and counts
Split an array into consecutive subsequences of at least length 3
Traverse a graph using Depth First Search
Count separate islands in a 2D grid using BFS flood-fill
Find the time needed to inform all employees using DFS with memoization
Find the importance of an employee using DFS with memoization
Clone a graph using DFS
Check if a graph is bipartite using DFS with coloring
Find all nodes exactly K edges away from target using BFS with parent links
Find minimum time for all oranges to rot using multi-source BFS
Find shortest word transformation sequence using BFS
Find valid course order using DFS topological sort on prerequisite graph
Find eventual safe states in a graph using DFS
Find minimum height trees in a graph using BFS
Count connected components in adjacency matrix using DFS
Find redundant connection in a graph using Union-Find
Check prerequisite relationships using BFS topological sort with ancestor sets
Find minimum semesters using BFS level-by-level topological sort
Paint connected pixels with new color using recursive DFS
Count distinct island shapes using DFS with path signatures
Find makeable recipes using BFS from supplies through ingredient graph
Sort items respecting group and dependency constraints using dual topological sort
Derive character ordering from sorted alien words using topological sort
Count connected components in undirected graph using Union-Find
Capture surrounded O regions using DFS
Check if undirected graph forms a valid tree using Union-Find
Merge accounts with common emails using Union-Find
Evaluate variable division queries using weighted Union-Find
Find max removable stones by grouping via row/col using Union-Find
Count islands after each addLand operation using online Union-Find
Find bridges in graph using Tarjan's algorithm with disc/low arrays
Find longest path in tree with different adjacent characters using post-order DFS
Find distance to nearest zero using multi-source BFS
Fill rooms with distance to nearest gate using multi-source BFS
Find minimum turns to open lock using BFS on combinations
Find minimum moves on board game using BFS
Find minimum gene mutations using BFS on gene strings
Find minimum knight moves to target using BFS
Find shortest clear path using 8-directional BFS
Find path maximizing minimum value using binary search + BFS
Find shortest path with obstacle elimination using BFS with 3D state
Find minimum buses to reach destination using BFS on routes
Find minimum obstacles to remove using 0-1 BFS with deque
Find cheapest price with at most K stops using Bellman-Ford variant
Find path with maximum success probability using modified Dijkstra
Find path minimizing maximum absolute height difference using Dijkstra
Find shortest distance in a maze with rolling ball using BFS
Find minimum cost to convert string using Floyd-Warshall on characters
Find minimum time to reach last room using modified Dijkstra on grid
Find minimum time to swim from top-left to bottom-right using Dijkstra
Find minimum cost for valid path using 0-1 BFS with deque
Find minimum weight subgraph connecting two sources to destination using triple Dijkstra
Find minimum cost to connect all points using Kruskal's algorithm
Find minimum cost to connect all cities using Prim's algorithm
Find minimum cost to supply water using Prim's algorithm with a virtual well node
Find shortest string containing all codes using de Bruijn sequence
Find valid pair arrangement using Hierholzer's Eulerian path algorithm
Find the shortest path using heuristic-guided best-first search
Find all paths from source to target in a DAG
Find shortest paths from a source, handling negative weights
Traverse a graph level by level using a queue
Decompose a tree by repeatedly finding and removing centroids
Identify critical and pseudo-critical edges in a minimum spanning tree
Detect a cycle in a directed graph using DFS
Detect a cycle in an undirected graph using DFS or Union-Find
Find shortest paths from a source in a weighted graph
Find all-pairs shortest paths in a weighted graph
Decompose a tree for efficient path queries
Find all strongly connected components in a directed graph
Find a minimum spanning tree using Kruskal's greedy approach
Find the largest island size after flipping at most one 0 to 1
Find the spanning tree that maximizes the minimum edge weight
Find the time it takes for all nodes to receive a signal
Count connected components in an undirected graph
Count land cells that cannot reach the boundary
Find cells from which water can flow to both the Pacific and Atlantic ocean
Find a minimum spanning tree using Prim's greedy approach
Find a valid itinerary using all tickets in lexicographic order
Find strongly connected components using Tarjan's DFS-based algorithm
Order nodes in a DAG such that all edges go from earlier to later nodes
Track and merge disjoint sets with path compression and union by rank
Find the length of the longest increasing subsequence
Find the minimum path sum from top-left to bottom-right in a grid
Find max envelopes that can be Russian dolled using Sort + LIS
Find the number of ways to climb to the top of the stairs
Find the minimum cost to climb to the top of the stairs
Find maximum money to rob from houses using dynamic programming
Find maximum money to rob from houses in a circle using dynamic programming
Find number of unique paths to reach the bottom-right corner of a grid with obstacles using dynamic programming
Find number of square submatrices with all ones using dynamic programming
Find maximum number of points with cost using dynamic programming
Find maximum profit in job scheduling using dynamic programming
Find length of longest subsequence common to both strings using dynamic programming
Find minimum number of operations to convert one string to another using dynamic programming
Find length of longest palindromic subsequence using dynamic programming
Find number of ways to decode a string using dynamic programming
Check if one string matches the pattern using dynamic programming
Count number of ways to get t from s using dynamic programming
Find minimum number of coins to make amount using dynamic programming
Count number of ways to make amount using coins with dynamic programming
Find minimum number of perfect squares that sum to n using dynamic programming
Check if the array can be partitioned into two subsets with equal sum using dynamic programming
Find number of ways to target sum using dynamic programming
Find the minimum weight of the last stone using dynamic programming
Find minimum path sum in a triangle using dynamic programming
Compute the nth Fibonacci number using space-optimized DP
Find the longest chain of pairs using greedy sorting by end value
Maximize points by deleting numbers using house-robber style DP
Maximize the product of parts that sum to n using math and DP
Find maximum sum divisible by 3 using remainder DP
Count grid painting ways using pattern transition DP
Find max subset size with limited 0s and 1s using 2D knapsack DP
Count schemes meeting profit threshold using 2D knapsack DP
Find minimum cost for travel days using DP with ticket passes
Count the number of longest increasing subsequences using DP
Find the longest chain of words where each differs by one character
Find the longest arithmetic subsequence using hash map DP
Generate Pascal's triangle row by row using dynamic programming
Count unique paths in a grid using space-optimized DP
Find the largest square of 1s in a binary matrix using DP
Find minimum cost to paint houses with no two adjacent same color
Find minimum sum falling path through a matrix using DP
Maximize points by removing boxes using 3D memoization DP
Find the largest rectangle of 1s in a binary matrix using width DP
Collect maximum cherries with two walkers using simultaneous DP
Find minimum initial health to reach bottom-right using reverse DP
Find longest increasing path using BFS topological sort
Count grid colorings using state transition matrix exponentiation
Find minimum cost path with teleportation phases using multi-pass DP
Determine if frog can cross river by jumping on stones using hash map DP
Find minimum transfers to settle debts using bitmask subset DP
Partition jobs into d days minimizing total difficulty using monotonic stack DP
Find minimum cost to cut a stick at given positions using interval DP
Determine if a string can be segmented into dictionary words using DP
Check if s3 is formed by interleaving s1 and s2 using space-optimized DP
Find minimum deletions to make string of a's and b's balanced using greedy DP
Find all possible sentences from dictionary words using recursive DFS with memoization
Match string against pattern with '.' and '*' using 2D bottom-up DP
Find minimum cuts for palindrome partitioning using expand-around-center DP
Find minimum turns to print a string using interval DP with character merging
Build shortest supersequence of two strings using LCS DP with traceback
Generate all structurally unique BSTs using bottom-up interval DP
Find the number of shortest paths using Dijkstra with counting
Compute distance sums for all nodes using rerooting DP with two DFS passes
Assign workers to bikes minimizing total distance using bitmask DP
Partition array into k subsets of equal sum using bitmask DP with bucket fill
Find minimum work sessions using subset DP with session time constraint
Distribute cookies among children minimizing unfairness using bitmask DP
Find shortest path visiting all nodes using BFS with bitmask DP
Count numbers with unique digits up to 10^n using combinatorial DP
Count occurrences of digit 1 in all numbers from 1 to n using digit analysis
Count numbers at most N formed from a given digit set using right-to-left DP
Find probability of knight staying on board after k moves using grid DP
Find probability of soup A being emptied first using 2D DP
Find probability of score ≤ n using sliding window DP
Find max profit with cooldown using 3-state DP (held, sold, rest)
Find max profit with transaction fee using 2-state DP (cash, hold)
Find max profit with at most 2 transactions using 4-state DP
Find max profit with at most k transactions using 2D DP with maxDiff optimization
Find the longest palindromic substring using dynamic programming
Find all words that can be formed by concatenating other words in the list
Find the maximum sum subsequence where no two elements are more than k apart
Count range sums that lie in a given interval
Simulate how a secret spreads among people with delay and forget intervals
Handle point updates and range sum queries using a Binary Indexed Tree
Handle point updates and region sum queries using a 2D Binary Indexed Tree
Count smaller elements to the right using a Binary Indexed Tree
Simulate falling squares and track max height using a Segment Tree with lazy propagation
Check if blocks fit between obstacles using a Segment Tree and sorted set
Find the longest balanced subarray using a Lazy Segment Tree
Count valid pairs using a Binary Indexed Tree on difference array
Efficient data structure for prefix sum queries and point updates
Track ranges of numbers and query if a range is covered
Answer sum queries on a 2D matrix using 2D prefix sums
Answer range sum queries on an immutable array using prefix sums
Count important reverse pairs using merge sort or BIT
Build a segment tree for range sum queries and point updates
Handle range updates efficiently using lazy propagation in segment trees
Preprocess an array for O(1) range minimum/maximum queries
Answer range queries using square root decomposition
Check if a number reads the same forwards and backwards by reversing half
Reverse digits of a 32-bit signed integer with overflow detection
Count trailing zeroes in n! by counting factors of 5
Determine if four points form a valid square using pairwise distances
Find the minimum area rectangle from a set of points in the xy-plane
Find the maximum number of points that lie on the same straight line
Determine if rectangles form an exact cover of a rectangular region
Implement fast exponentiation using repeated squaring
Find the total area covered by a list of rectangles
Multiply two numbers represented as strings using digit-by-digit multiplication
Find the duplicate in an array using Floyd's cycle detection
Count good digit strings using binary exponentiation
Count primes less than n using the Sieve of Eratosthenes
Count valid triangles using sorting and two pointers
Find the minimum area rectangle from a set of points
Increment a number represented as an array of digits
Convert a Roman numeral string to an integer
Convert a column number to its Excel column title
Find the largest string that divides both input strings
Check if a number's prime factors are limited to 2, 3, and 5
Find the nth ugly number using three pointers
Find the winner of Josephus-style elimination game
614 of 614 algorithms shown