AlgoTree
Home
Algorithms
Sorting Algorithms
Merge Sort
QuickSort
Binary Search
Searching a number in a 2D Sorted Matrix
Binary Search : Counting Duplicates ๐คก ๐คก
Binary Search : Finding Square Root โ
Smallest Number In A Rotated Sorted Array
Search Number In A Rotated Sorted Array โป
Binary Search : Allocate books ๐
Binary Search : Ship packages ๐ข
Range Minimum Queries ( RMQ ) : Sparse Table
Binary Indexed Tree ( Fenwick Tree ) ๐
Adjacency Lists
[ C++ ] : Storing Graph As An Adjacency List
[ Java ] : Storing Graph As An Adjacency List
[ Python ] : Storing Graph As An Adjacency List
Tree & Graph Traversals
Pre-Order, In-Order & Post-Order Traversals
In-Order & Pre-Order : Construct Binary Tree
In-Order & Post-Order : Construct Binary Tree
Level Order Tree Traversal
Right View Of A Binary Tree ๐ฒ โ
Level Order : Sum Of The Deepest Leaves
Top View Of A Binary Tree
Balance Binary Search Tree โ
Level Order : Minimum Depth Of A Binary Tree
Breadth First Search ( BFS )
BFS : Finding Max Area Of An Island
BFS : Finding The Number Of Islands ๐ ๐
Depth First Search ( DFS )
DFS : Finding Longest Path In A Tree
DFS : All Paths In A Directed Acyclic Graph
DFS : Detecting Cycle In A Directed Graph โฐ
DFS : Detecting Cycle In An Undirected Graph
Topological Sort
[ C++ ] : Lexical Topological Sort
[ Python ] : Lexical Topological Sort
Finding A Binary Subtree In A Tree
Finding Diameter of a Binary Tree
Deleting Leaf Nodes In A Binary Tree
Merging Binary Trees
Binary Search Tree
Searching A Binary Search Tree
Validating A Binary Search Tree
Inserting Into A Binary Search Tree
Height-Balanced Tree Check Using Recursion
Height-Balanced Tree Check Using Traversal
Heap
[ C++ ] : Max & Min Heap ( Priority Queue / Set )
[ Python ] : Max & Min Heap ( HeapQ )
K Most Frequent Elements In An Array
K'th largest and smallest element in an array
Merge K Sorted Linked Lists
LRU ( Least Recently Used ) Cache
Stack
Expression Conversion : Infix To Postfix
Evaluating An Infix Expression
Largest Rectangle In A Histogram ๐
Max Size 1 Filled Rectangle In A Binary Matrix
Stock Span Problem ๐
Longest Valid Parentheses
Hash Table & Set
LFU ( Least Frequently Used ) Cache
Finding Anagrams
Grouping Anagrams
Longest Substring w/o Repeating Characters
Linked List ๐๐๐๐
Singly Linked List : Insert & Append
Singly Linked List : Reverse
Singly Linked List : Detect Cycle
Singly Linked List : Remove Duplicates
Doubly Linked List : Insert, Append & Delete
Backtracking
N Queens problem โ โ โ โ โ โ โ โ
Backtracking + DFS : A Game Of Boggle
Letter Phone ๐ฑ
Generating Integer Partitions
Partition N Elements Into K Non-Empty Subsets
Palindrome Partitioning
Break a string into a given set of words
Word Search
Greedy
Light Bulbs ๐ก ๐ก ๐ก ๐ก ๐ก
Disjoint-Set : Union By Rank, Path Compression
Lowest Common Ancestor ( LCA )
Finding The LCA Using Recursion
Finding The LCA Using Upward Traversals
Finding The LCA By Moving Level Up And Closer
Minimum Spanning Tree Algorithms
[ Python ] : Prim's Minimum Spanning Tree
[ Java ] : Prim's Minimum Spanning Tree
[ C++ ] : Prim's Minimum Spanning Tree
Kruskal's Minimum Spanning Tree
Single Source Shortest Path Algorithms
[ Python ] : Dijkstra's Shortest Path
[ C++ ] : Dijkstra's Shortest Path
[ Java ] : Dijkstra's Shortest Path
Bellman-Ford's Shortest Path Algorithm
Bellman Ford's Algorithm For DAG
All Pairs Shortest Path : Floyd-Warshall
Numeric ๐ข
Fibonacci Sequence ๐งฌ
Euler's Totient Function
Prime Sieve : Generating Prime Numbers
Prime Factors
Euclid's : Finding The Greatest Common Divisor
Factorials Of Large Numbers !
Fast Exponentiation
Modular Multiplication & Exponentiation
Prime Or Non Prime ( Miller-Rabin )
Pythagorean Triples ๐
Pythagorean Triples In An Array ๐
Binomial Coefficents
Subsets / Combinations : Bitwise
Subsets Using Permutations
Integer To Hexadecimal Conversion
Matrix Multiplication
Sudoku
Validate A Given Sudoku
Computational Geometry
Line Segment Intersection
Bitwise Operations
Number Of Set Bits In An Integer
Toggle Last Set Bit
Swapping Integers Using Bitwise XOR
Binary To Decimal Conversion
Recursive Algorithms ๐ ๐ ๐
Recursive : Finding the N'th Fibonacci number
Recursive : Generating Permutations
Recursive : Generating Subsets / Combinations
Recursive : Dollar sack ๐ฐ๐ฐ๐ฐ
Recursive : Generating Subsequences
Recursive : Generating All Balanced Parenthesis
Recursive : Tower Of Hanoi ๐ผ
Recursive : Finding Max Depth Of A Binary Tree
Dynamic Programming
Longest Common Subsequence ๐งฌ
Longest Increasing Subsequence ๐งฌ
Distinct Subsequences ๐งฌ
Matrix Chain Multiplication โ โ โ โ โ
Finding Longest Palindromic Substring
Minimum Cuts To Make A Palindrome โ โ
Word Break
String Interleave
0-1 Knapsack Problem ๐ฐ
Coins Change Problem ๐ช
Minimum Coins For Making Change ๐ต ๐ช
Integer Partitioning Problem
Subset Sum Problem โ
Maximum Product Subarray Problem
Maximum Sum Subarray Problem
Finding Size Of Biggest 1 Filled Square
Maximum Sum SubRectangle
Using Aggregate Rectangles
Applying Kadane's Algorithm On Row Sums
Unique Paths In A Grid โฆ
Egg Drop Problem ๐ฅ
Assignment Problem Using BitMask
Edit Distance
Climbing Stairs Problem ๐ช
KMP Pattern Match Algorithm
Minimum Steps To Make Two Strings Anagrams
Trie [ Python ] [ Java ]
Trie [ C++ ]
Counting Distinct Substrings
Solving Boggle Using Trie & Depth First Search
Rubix Cube
Solving a 2 x 2 Rubix Cube ๐
Solving a 3 x 3 Rubix Cube
A Pinch Of Code
Java : List - Create & Initialize
Java : List Of Arrays
Python : Create A Dictionary From A List
Python : Sort Dictionary By Value & Key
Python : Delete Key & Value from Dictionary
Python : Merge Dictionaries
Python : Two dimensional list.
Python : Convert List Of Strings To List Of Int
Python : Getting Current Date & Time
Python : Decorators
Python : Reading JSON file
Python : Agrument Parser
Python : First & Last N Characters Of A String
Go : Check If File Exists
Go : Read File Line By Line
Go : Extract Pattern Using Regular Expression
Go : Check If A Key Exists In A Map ( Dict )
Go : Remove / Hide fields from a struct
C++ : Compilation Process
C++ : String conversion upper / lower case
C++ : Convert String Of Integers Into A Vector
C++ : Static Keyword
C++ : Copy Constructor
C++ : Lvaule and Rvalue
C++ : Move Constructor
C++ : Overload Assignment (=) Operator
C++ : Move Assignment Operator
C++ : Overload Subscript ( [ ] ) Operator
C++ : Member Initializer List
C++ : Singleton Design Pattern
C++ : Templates
C++ : static_cast & dynamic_cast
C++ : const_cast & reinterpret_cast
C++ : Throwing Exceptions From A Destructor
C++ : Lambda Expression & Callback Functions
C++ : Smart Pointers ( unique, shared, weak )
C++ : Initializing A Vector
C++ : Threads ( Producer & Consumer )
C++ : Threads & Condition Variable ๐งต
C++ & Boost : Program Options
C++ & Boost : Parsing XML
C++ & Boost : Generating UUID
JavaScript : Remove An Item From An Array
JavaScript : Accept Only A Numeric Input
JavaScript : Extract Numbers From String
About
Algotree
>
Tags
> Disjoint-Set
tag :: Disjoint-Set
Disjoint-Set, Union By Rank & Path Compression