Leetcode Top 150 Problems - Link
- QuickSort implementation in java
- HeapSort implementation in java
- MergeSort implementation in java
- Selection Sort
- Bubble Sort
- Insertion Sort
- Sort an array of 0s, 1s and 2s | Dutch National Flag problem
- Find first and last positions of an element in a sorted array
- Sort an array according to count of set bits
- Smallest factorial number
- Rearrange numbers with constant extra space
- Merge Sorted Array
- Search in Rotated Sorted Array
- Boyer-Moore Majority Voting Algorithm/ Majority Element
- Count triplets with sum smaller than X
- Minimum Swaps to Sort+
- Print all subarrays with 0 sum
- Binary Search
- Floor in a Sorted Array
- Floor/Ceil in Sorted Array
- Search Insert Position
- Find First and Last Position of Element in Sorted Array
- Number of occurrence
- Sqrt(x)
- Nth Root of a Number using Binary Search
- Peak Element in array
- Single Element in a Sorted Array
- Subset Sums
- Power (x,n)
- Count Good Numbers
- Subsets
- Combination Sum
- Combination Sum II
- Combination Sum III
- Letter Combinations of a Phone Number
- Subsets II
- Permutations
- Permutations II
- Rotate List
- Find first node of loop in a linked list
- Segregate even and odd nodes in a Linked List
- Remove Nth Node From End of List
- Add 2 numbers in LL
- Add 1 to a Linked List Number
- Delete the Middle Node of a Linked List
- Delete all occurrences of a given key in a doubly linked list
- Find pairs with given sum in doubly linked list
- Max and Min with minimum number of comparison
- Peak Element
- Find Union and Intersection of two arrays
- CommonElements in Three Sorted Arrays
- Alternate positive and negative numbers
- Three way partitioning
- Find Pivot Index
- Max Consecutive Ones II
- Pascal's Triangle
- Rearrange Array Elements by Sign
- Find missing number in an array
- Longest subarray with sum K (Positives + Negatives)
- 3Sum
- Largest subarray with 0 sum
- Longest Sub-Array with Sum K
- Majority Element - Boyer-Moore Voting Algorithm
- Majority Element II
- Missing And Repeating
- Merge two sorted arrays without extra space
- Dutch National Flag Problem - Sort an array of 0's 1's and 2's
- Next Permutation
- Kth smallest element
- Rotate Array
- Maximum Subarray or Kadane's Algorithm
- Maximum Score from Subarray Minimums
- Minimize the Heights
- Minimum number of jumps
- Count Inversions
- Reverse Pairs
- Best time to buy and Sell stock
- Count pairs with given sum
- Factorials of large numbers
- Maximum Product Subarray
- House Robber
- Product of Array Except Self
- Longest consecutive subsequence
- Trapping Rain Water
- Median of 2 sorted arrays of equal size
- Median of 2 sorted arrays of different size
- Not a subset sum
- Set Matrix Zeroes
- Rotate Matrix by 90 degrees
- Spiral Matrix
- Subarray Sum Equals K
- Longest K unique characters substring
- Isomorphic Strings
- Shuffle String
- Look and Say Pattern
- Remove all consecutive duplicates from the string
- Count Binary Substrings
- Letter Combinations of a Phone Number
- Longest Repeating Subsequence
- Word Search
- Roman Number to Integer
- Print Anagrams Together
- Isomorphic Strings
- Remove outermost Paranthesis
- String to Integer (atoi)
- Valid Substring
- Check if the given string is shuffled substring of another string
- Print all subsequences of a string
- Permutations of a given string
- Print all substrings
- Find the string in grid
- Next Permutation
- Permutations
- Number of Matching Subsequences
- KMP Algorithm/Longest Prefix Suffix
- Word Break
- Count Reversal
- Longest Common Subsequence
- Smallest distinct window
- Transform One String to Another using Minimum Number of Given Operation
- Minimum characters to be added at front to make string palindrome
- Recursively remove all adjacent duplicates
- Spirally traversing a matrix
- Search a 2D Matrix
- Row with max 1s
- Sort the given 2D Matrix
- Diagonal Traverse
- Implement Circular Queue
- BFS - Number of Islands
- Valid Parentheses
- Expression contains redundant bracket or not
- Daily Temperatures
- Implement Queue using Stacks
- Implement Stack using Queues
- Keys and Rooms
- 🔥 BFS - Open the Lock
- Next Greater Element
- The Celebrity Problem
- Design a stack with operations on middle element
- Get minimum element from stack in O(1) time
- 🔥 Validate Stack Sequences
- 🔥 Valid Substring
- Inorder Traversal (Iterative)
- 🔥 Decode String
- 🔥 01 Matrix
- Online Stock Span
- Next Greater Element II
- Number of NGEs to the right
- Convert Infix to Postfix
- Prefix to Infix Conversion
- Prefix to Postfix Conversion
- Postfix to Prefix Conversion
- Postfix to Infix Conversion
- Convert Infix to Prefix
- ZigZag Tree Traversal
- Preorder, Inorder, and Postorder Traversal
- Binary Tree Level Order Traversal
- Binary Tree Maximum Path Sum
- [Boundary Traversal of binary tree]
- Top View of Binary Tree
- Bottom View of Binary Tree
- Binary Tree Right Side View
- Symmetric Tree
- Lowest Common Ancestor of a Binary Tree
- Check for BST
- Search in a Binary Search Tree
- Floor Binary Search Tree
- Ceil Binary Search Tree
- Insert a given Node in Binary Search Tree
- Predecessor and Successor
- Delete Node in a BST
- Kth Smallest Element in a BST
- Validate Binary Search Tree
- Lowest Common Ancestor of a Binary Search Tree
- Permutations
- Permutations II
- Subsets
- Subsets II
- Combination Sum
- Combination Sum II
- Palindrome Partitioning
- Longest Palindrome in a String
- Minimum Operations
- Minimum number of Coins
- Longest Common Substring
- Longest Increasing Subsequence
- Max length chain
- Coin Change_Minimum Coins to Make Sum-I
- Find K Closest Elements
- Kth Largest Element in an Array
- K largest elements
- Sort a K Sorted Array
- Top K Frequent Elements
- Longest Substring Without Repeating Characters
- 🔥Sliding Window Maximum/K Sized Subarray Maximum
- 🔥Longest Sub-Array with Sum K
- Subarray Sum Equals K
- Longest K unique characters substring
- Max Consecutive Ones III
- Fruit Into Baskets
- Longest Repeating Character Replacement
- Binary Subarrays With Sum
- Count Number of Nice Subarrays
- Number of Substrings Containing All Three Characters
- Maximum Points You Can Obtain from Cards
- Assign Cookies
- Fractional Knapsack
- Lemonade Change
- Minimum number of Coins
- N meetings in one room
- Shortest Job first
- 🔥Valid Parenthesis String
- Jump Game
- Jump Game-II
- Minimum number of platforms
- Job Sequencing Problem
- Candy Count
- Insert Interval
- Merge Intervals
- Non-overlapping Intervals
- DFS - Adjacency Matrix Representation
- DFS - Adjacency List Representation
- BFS - Adjacency Matrix Representation
- BFS - Adjacency List Representation
- Flood Fill
- Connected Components
- Island Perimeter
- Number of Provinces
- Rotting Oranges
- Detect Cycle in an Undirected Graph - BFS & DFS Approach
- 01 Matrix
- Number of Enclaves
- Surrounded Regions
- Is Graph Bipartite?
- Detect Cycle in a Directed Graph - DFS
- Shortest path in Undirected Graph
- Djisktra's Algorithm
- Shortest path in Directed Acyclic Graph
- Shortest Path in Binary Matrix
- Bellman Ford Algorithm
- Floyd Warshall Algorithm
- Bridges in Graph
- Bipartite Graph
- Topological Sort Algorithm
- Kahn's Algorithm
- Cycle Detection in Directed Graph (BFS)
- Course Schedule-I
- Course Schedule-II
- Find Eventual Safe States
- Minimum Spanning Tree | Prim’s Minimum Spanning Tree Algorithm
- Kruskal’s Minimum Spanning Tree Algorithm
- Disjoint Set | Union by Rank and Path
- Number of Operations to Make Network Connected