Explore
101 visualisers you can step through forwards and backwards, with synced code and a reason for every move.
Showing 17 of 101
Pastel = track · chip = your mastery
- GreedyKnapsack (Greedy)A greedy approach to solve the fractional knapsack problem.O(n log n)
- GreedyActivity SelectionA greedy algorithm to select the maximum number of activities that can be performed.O(n log n)
- Dynamic Programming0/1 KnapsackA dynamic programming solution to the 0/1 knapsack problem.O(nW)
- Dynamic ProgrammingLongest Common SubsequenceFinds the longest subsequence present in both strings.O(mn)
- Dynamic ProgrammingEdit DistanceCalculates the minimum number of operations to convert one string to another.O(mn)
- Dynamic ProgrammingCoin ChangeThe fewest coins that add up to an amount, built up from every smaller amount.O(nA)
- Dynamic ProgrammingLongest Increasing SubsequenceThe longest run of values that rises from left to right, not necessarily adjacent.O(n²)
- Dynamic ProgrammingGrid PathsCount the paths across a grid moving only right or down, around obstacles.O(mn)
- Dynamic ProgrammingHouse RobberThe largest total from values where no two chosen ones are neighbours.O(n)
- BacktrackingN-Queens ProblemA backtracking algorithm to place N queens on an N×N chessboard.O(N!)
- BacktrackingSudoku SolverA backtracking algorithm to solve a Sudoku puzzle.O(9^m)
- BacktrackingPermutationsList every ordering by choosing an unused item for each position, then undoing the choice.O(n·n!)
- PatternsTwo PointersFind a pair with a given sum in a sorted array by moving one pointer from each end.O(n)
- PatternsSliding WindowFind the best run of k consecutive values by sliding a window and updating one running sum.O(n)
- PatternsMonotonic StackFind the next greater value for every element with a stack that stays in decreasing order.O(n)
- PatternsMerge IntervalsSort intervals by start, then sweep once, merging each one that overlaps the last.O(n log n)
- PatternsMeeting RoomsThe fewest rooms that fit every meeting: sweep by start time and reuse rooms as they free up.O(n log n)