AlgoTree
Home
Algorithms
Sorting Algorithms
Merge Sort
QuickSort
Binary Search
Binary Search : Finding Count Of 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
Level Order : Sum Of The Deepest Leaves
Level Order : Minimum Depth Of A Binary Tree
Breadth First Search ( BFS )
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
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 Cache
Stack
Expression Conversion : Infix To Postfix
Evaluating An Infix Expression
Finding The Largest Rectangle In A Histogram
Max Size 1 Filled Rectangle In A Binary Matrix
Stock Span Problem
Longest Valid Parentheses
Hash Table & Set
LFU Cache
Finding Anagrams
Grouping Anagrams
Longest substring without 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
Word break
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
Binomial Coefficents
Subsets / Combinations : Bitwise
Subsets Using Permutations
Integer To Hexadecimal Conversion
Matrix Multiplication
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 : Finding the value of a 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
Maximum Sum Subarray Problem
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 : 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 )
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++ & 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
> Binary Tree
tag :: Binary Tree
Check If A binary tree is a subtree in another binary tree (supertree)
Finding the diameter of a binary tree
Deleting Leaf Nodes In A Binary Tree