All DS & Algorithms are implemented in Java (for educational purposes)
- ArrayList
- LinkedList
- Vector & Stack
- Queue
- Deque
- Map
- HashCode & Equals
- Comparators & Comparable
- Tree
- Graph
- Priority Queue
- Trie
- Segment Tree
- Arrays
- Anagram Occurrence GFG
- Coins Of Geekland
- K Sorted Array GFG
- Maximum Sum Subarray of size k GFG
- Min Subsets with Consecutive Numbers GFG
- Smallest Positive Number that cannot be represented as Sum
- Geek Classmates GFG
- Majority Element GFG
- Replace 0's With X's GFG
- Triplet Sum GFG
- Longest Consecutive Sequence GFG
- Kadane's Algorithm GFG
- Best time to buy and sell stocks - l LeetCode
- Best time to buy and sell stocks - ll GFG
- Trapping Rain Water GFG
- Container with Most Water LeetCode
- Majority Element 2 LeetCode
- Majority Element General PepCoding
- Next Greator Element LeetCode
- Max Chunks GFG
- String Multiplication LeetCode
- Pascal's Triangle LeetCode
- Next Permutation GFG
- Partition Label LeetCode
- Sorting
- BinarySearch
- Search Element using Binary Search GFG
- Ceil and Floor in array
- Book Allocation GFG
- Find Element in Infinite Sorted Array GFG
- Matrix Search GFG
- Min Number in sorted rotated array GFG
- Missing Element of AP GFG
- Pivot Element in sorted rotated array
- Search in rotated array GFG
- Ternary Search GFG
- Double Helix SPOJ
- Factorial Number GFG
- String
- Bit Manipulation
- Basic Concepts
- Power of 2 GFG
- Power Set GFG
- Rightmost Different Bit GFG
- Subset
- Bit Difference GFG
- Bleak Number GFG
- Count Set Bits GFG
- Grey Code GFG
- Minimum XOR Pairs GFG
- Calculate square of a number without using *, / and pow() GFG
- Reverse Bits GFG
- Is Binary Number Multiple of 3 GFG
- UTF-8 GFG
- Sum of XOR of all pairs GFG
- Same no of set bits as that of n GFG
- Reduce a Number to 1 in Minimum Steps GFG
- Power Set GFG
- Find the n-th number whose binary representation is a palindrome GFG
- Find Missing And Repeating GFG
- Copy Set Bits GFG
- Divide two integers LeetCode
- Print Abbravations
- Swap all odd and even bits GFG
- Nqueen
- Solve Soduku GFG
- Recursion
- Basic
- FloodFill
- CoinMax
- Permutations
- Coin Toss
- Climbing Stairs
- Generate Parentheses LeetCode
- Letter Combination Of Phone Numer LeetCode
- Palindrome Partitioning LeetCode
- Reverse String
- Palindrome Check
- Subsequence of a String
- Tower Of Hanoi GFG
- Path In Maze
- Josephus problem GFG
- Handshakes GFG
- Happy Number GFG
- Print N-bit binary numbers having more 1s than 0s GFG
- BackTracking
- Maze Block GFG
- Partition An Array
- Shortest Path In Maze
- Subset LeetCode
- Word Search LeetCode
- Black and White GFG
- Combination Sum GFG
- Partition array to K subsets (Print all subsets)
- Rat Maze with Multiple Jumps GFG
- Solve Soduku GFG
- Largest Number in K Swaps GFG
- N Queen Problem GFG
- K Length Words GFG
- Knights Tour GFG
- Kth Permutation GFG
- Remove Inavlid Parentheses LeetCode
- Word Break GFG
- Word Pattern GFG
- Tug Of War GFG
- Permutations (Two Methods) PepCoding
- Combinations (Two Methods) PepCoding
- Queen Permutation PepCoding
- Queen Combination PepCoding
- K Length Words PepCoding
- CrossWord Puzzle PepCoding
- N Queen Branch and Bound PepCoding
-
Mathematice For CP
-
Dynamic Programming
-
ArrayList
-
LinkedList
- Reverse a LL GFG
- Rearrange LL in place GFG
- Sorted insert for LL GFG
- Sorted insert for CLL GFG
- Sorted insert for DLL GFG
- Absolute List Sorting GFG
- Detect loop GFG
- Remove loop GFG
- Intersection point in Y shaped LL GFG
- Reverse a LL in groups of size K GFG
- Count Triplets GFG
- Intersection of two sorted LL GFG
- Union of two LL GFG
- Add 1 Number in LinkedList GFG
- Add Two LinkedList GFG
- Split a circular LiinkedList into two halves GFG
- Mutliply two LinkedList GFG
- Quick Sort on LinkedList GFG
- Quick Sort on DoublyLinkedList GFG
- Merge Sort on LinkedList GFG
- Flatten a LinkedList GFG
- Remove Duplicates from an unsorted LinkedList GFG
- LinkedList is Palindrome GFG
- Pairs with Given Sum in DoublyLinkedList GFG
- Sort a LinkedList containing 0's, 1's and 2's GFG
- Clone a LinkedList GFG
- Merge k sorted LL GFG
- Design LRU Cache GFG
- Reverse In Range LeetCode
-
Vector & Stacks
- Parenthesis Checker GFG
- Celebrity Problem GFG
- Restrictive Candy Crush GFG
- Stack using two Queues GFG
- Valid Substring GFG
- Maximum Rectangular Area in a Histogram GFG
- Infix Evaluation GFG
- Infix Conversion GFG
- Postfix Evaluation GFG
- Postfix Conversion
- Prefix Conversion
- Patten Following GFG
- Next greator Element GFG
- Implemennt K stacks GFG
- Score of Parentheses LeetCode
- Min Remove to make parestheses valid LeetCode
- Asteroid Collission LeetCode
- Remove Duplicate letters LeetCode
- Online Stock Span LeetCode
- Exclusive time of finctions LeetCode
- 132 pattern LeetCode
- Remove K digits LeetCode
- Basic Calculator LeetCode
- Next Gretor Element II LeetCode
-
Queue
- Restricted Pacman GFG
- Sliding Window Maximum (Max of all subarrays of size k) GFG
- First negative integer in every window os size k GFG
- Card Rotation GFG
- Interleave the first half of the queue with second half GFG
- Queue using Stacks GFG
- Stack using Queue (Push Efficient) GFG
- Stack using Queue (Pop Efficient) GFG
-
HashMap
- Map Implementation PepCoding
- Array Pair Sum Divisibility GFG
- Count Distinct element in every window of size k GFG
- Find Number of Employees under every employee GFG
- Find Itinerary from a given list of tickets GFG
- Largest Subarray with sum k GFG
- Largest Subarray with sum 0 GFG
- Count total no of subarrays with sum k LeetCode
- Count total no of subarrays with sum zero GFG
- Largest Subarray with contigous elements GFG
- Smallest window in string containing all the characters GFG
- Smallest window that contains all characters of string itself GFG
- Length of the longest substring having all unique characters GFG
- Count of substring having all unique characters GFG
- Longest substring with exactly k unique characters GFG
- Count of Equivalent Subarrays GFG
- Maximum Consecutive Ones LeetCode
- Longest Substring With At Most K Unique Characters PepCoding
- Count of Substring With At Most K Unique Characters PepCoding
- K Anagrams GFG
- Group Shifted Strings GFG
- Isomorphic Strings GFG
- Word Pattern LeetCode
- Longest Subarray with equal no of 0's and 1's GFG
- Count of Subarray with equal no of 0's and 1's Pepcoding
- Longest Subarray With Sum Divisible By K GFG
- Count of Subarray With Sum Divisible By K GFG
- Longest Subarray With Equal Number Of 0s 1s And 2s PepCCoding
- Count of Subarray With Equal Number Of 0s 1s And 2s GFG
- Pairs with Equal sum PepCoding
- Simple Fraction GFG
- Rabbits in the Forest LeetCode
- Arithmetic Sequence LeetCode
- Smallest Subarray With All Occurrences Of The Most Frequent Element GFG
- Double Pair Array LeetCode
- Maximum Points on the line LeetCode
- Quadruplet Sum 1 LeetCode
- Quadruplet Sum 2 LeetCode
- Frequency Game
- Group Anagrams GFG
- Ruling Pair GFG
- Sort and array according to other GFG
-
Heap
-
Trees
- Generic Tree
- Implementation
- Level Order Traversal PepCoding
- Level Order Traversal (Line by Line) PepCoding
- Level Order Traversal (Zig Zag) PepCoding
- Remove Leaves PepCoding
- Linearize Tree PepCoding
- Linearize Tree in O(n) PepCoding
- Node to Root Path PepCoding
- Lowest Common Ancestor PepCoding
- Multisolver PepCoding
- Predecessor and Successor PepCoding
- Ceil And Floor PepCoding
- Kth Largest Element PepCoding
- Node with Max Subtree Sum PepCoding
- Diameter PepCoding
- Iterative Preorder And Postorder PepCoding
- Binary Tree
- Implementation
- Level Order Traversal (Line by Line) LeetCode
- Level Order Traversal (Spiral Form) GFG
- Nodes at given distance from root GFG
- Node to Root Path GFG
- Node k distance away Two Methods GFG
- Diameter Of Binary Tree GFG
- Tree is BST or not GFG
- Balanced Tree GFG
- Largest BST Subtree GFG
- Min No of Camera LeetCode
- House Robbery GFG
- Longest ZigZag path LeetCode
- Validate BST Using Inorder GFG
- Fix two Node of BST GFG
- Left View GFG
- Right View GFG
- Top View GFG
- Bottom View GFG
- Vertical Order Traversal LeetCode
- Vertical Order Traversal (M-2) LeetCode
- Diagonal Traversal GFG
- Vertical Order Traversal With a constraint PepCoding
- Searialize and Deserialize LeetCode
- Diagonal Order Sum using dfs GFG
- Inorder Morris Traversal GFG
- Preorder Morris Traversal GFG
- Lowest Common Ancestor LeetCode
- Max Path Sum between two Leaves GFG
- Max Path Sum between two Node GFG
- Construct BT Using Inorder and Preorder GFG
- Construct BT Using Inorder and Postorder GFG
- Construct BT Using Preorder and Postorder GFG
- Construct BT Using Inorder and Levelorder GFG
- Validate BST Using Morris Traversal GFG
- Make BT Fron LL GFG
- Print BT levels in Sorted Order GFG
- Check Tree Traversal GFG
- Corona Vaccine GFG
- Inorder, Preorder and Postorder Using Iterative Approach
- Burning Tree 1 GFG
- Burning Tree 2 GFG
- Max Width of Binary Tree GFG
- Symmetric Tree GFG
- Valentine Sum GFG
- Binary Search Tree
- Implementation
- Level Order Traversal GFG
- Array to BST GFG
- Construct BST from Preorder GFG
- Construct BST from Postorder GFG
- Construct BST from Level Order GFG
- Convert BST to Doubly LL PepCoding
- Convert sorted Doubly LL to BST PepCoding
- Binary Search Iterator (Stack) GFG
- Binary Search Iterator (Morris) GFG
- Generic Tree
-
Graph
- Depth For Search (DFS)
- Breadth For Search (BFS)
- Kruskal's Algo
- Prim's Algo
- Dijkstra's Algo
- Detect Cycle
- Undirected Graph