Arrays

- Reverse the array
- Find the maximum and minimum element in an array
- Find the "Kth" max and min element of an array
- Given an array which consists of only 0, 1 and 2. Sort the array without using any sorting algo
- Move all the negative elements to one side of the array
- Find the Union and Intersection of the two sorted arrays.
- Write a program to cyclically rotate an array by one.
- Find Largest sum contiguous Subarray [V. IMP]
- Minimise the maximum difference between heights [V.IMP]
- Minimum no. of Jumps to reach end of an array
- Find duplicate in an array of N+1 Integers
- Merge 2 sorted arrays without using Extra space.
- Kadane's Algo [V.V.V.V.V IMP]
- Merge Intervals
- Next Permutation
- Count Inversion
- Best time to buy and Sell stock
- Find all pairs on integer array whose sum is equal to given number
- Median of 2 sorted arrays of different size
- Median of 2 sorted arrays of equal size
- Find common elements In 3 sorted arrays
- Rearrange the array in alternating positive and negative items with O(1) extra space
- Find if there is any subarray with sum equal to 0
- Find factorial of a large number
- find maximum product subarray
- Find longest coinsecutive subsequence
- Given an array of size n and a number k, fin all elements that appear more than " n/k " times.
- Maximum profit by buying and selling a share atmost twice
- Find whether an array is a subset of another array
- Find the triplet that sum to a given value
- Trapping Rain water problem
- Chocolate Distribution problem
- Smallest Subarray with sum greater than a given value
- Three way partitioning of an array around a given value
- Minimum swaps required bring elements less equal K together
- Minimum no. of operations required to make an array palindrome

Matrix

- Spiral traversal on a Matrix
- Search an element in a matriix
- Find median in a row wise sorted matrix
- Find row with maximum no. of 1's
- Print elements in sorted order using row-column wise sorted matrix
- Maximum size rectangle
- Find a specific pair in matrix
- Rotate matrix by 90 degrees
- Kth smallest element in a row-cpumn wise sorted matrix
- Common elements in all rows of a given matrix

String

- Reverse a String
- Check whether a String is Palindrome or not
- Find Duplicate characters in a string
- Write a Code to check whether one string is a rotation of another
- Write a Program to check whether a string is a valid shuffle of two strings or not
- Count and Say problem
- Write a program to find the longest Palindrome in a string.[ Longest palindromic Substring]
- Find Longest Recurring Subsequence in String
- Print all Subsequences of a string.
- Print all the permutations of the given string
- Split the Binary string into two substring with equal 0’s and 1’s
- Word Wrap Problem [VERY IMP].
- EDIT Distance [Very Imp]
- Find next greater number with same set of digits. [Very Very IMP]
- Balanced Parenthesis problem.[Imp]
- Word break Problem[ Very Imp]
- Rabin Karp Algo
- KMP Algo
- Convert a Sentence into its equivalent mobile numeric keypad sequence.
- Minimum number of bracket reversals needed to make an expression balanced.
- Count All Palindromic Subsequence in a given String.
- Count of number of given string in 2D character array
- Search a Word in a 2D Grid of characters.
- Boyer Moore Algorithm for Pattern Searching.
- Converting Roman Numerals to Decimal
- Longest Common Prefix

Searching & Sorting

- Find first and last positions of an element in a sorted array
- Find a Fixed Point (Value equal to index) in a given array
- Search in a rotated sorted array
- square root of an integer
- Maximum and minimum of an array using minimum number of comparisons
- Optimum location of point to minimize total distance
- Find the repeating and the missing
- find majority element
- Searching in an array where adjacent differ by at most k
- find a pair with a given difference
- find four elements that sum to a given value
- maximum sum such that no 2 elements are adjacent
- Count triplet with sum smaller than a given value
- merge 2 sorted arrays
- print all subarrays with 0 sum
- Product array Puzzle
- Sort array according to count of set bits
- minimum no. of swaps required to sort the array
- Bishu and Soldiers
- Rasta and Kheshtak
- Kth smallest number again
- Find pivot element in a sorted array
- K-th Element of Two Sorted Arrays

Binary Tress

- level order traversal
- Reverse Level Order traversal
- Height of a tree
- Diameter of a tree
- Mirror of a tree
- Inorder Traversal of a tree both using recursion and Iteration
- Preorder Traversal of a tree both using recursion and Iteration
- Postorder Traversal of a tree both using recursion and Iteration
- Left View of a tree
- Right View of Tree
- Top View of a tree
- Bottom View of a tree
- Zig-Zag traversal of a binary tree
- Check if a tree is balanced or not
- Diagnol Traversal of a Binary tree
- Boundary traversal of a Binary tree
- Construct Binary Tree from String with Bracket Representation
- Convert Binary tree into Doubly Linked List
- Convert Binary tree into Sum tree
- Construct Binary tree from Inorder and preorder traversal
- Find minimum swaps required to convert a Binary tree into BST
- Check if Binary tree is Sum tree or not

Binary Search Trees

- Fina a value in a BST
- Deletion of a node in a BST
- Find min and max value in a BST
- Find inorder successor and inorder predecessor in a BST
- Check if a tree is a BST or not
- Populate Inorder successor of all nodes
- Find LCA of 2 nodes in a BST
- Construct BST from preorder traversal
- Convert Binary tree into BST
- Convert a normal BST into a Balanced BST
- Merge two BST [ V.V.V>IMP ]
- Find Kth largest element in a BST
- Find Kth smallest element in a BST
- Count pairs from 2 BST whose sum is equal to given value "X"

Greedy

- Activity Selection Problem
- Job SequencingProblem
- Huffman Coding
- Water Connection Problem
- Fractional Knapsack Problem
- Greedy Algorithm to find Minimum number of Coins
- Maximum trains for which stoppage can be provided
- Minimum Platforms Problem
- Buy Maximum Stocks if i stocks can be bought on i-th day
- Find the minimum and maximum amount to buy all N candies
- Minimize Cash Flow among a given set of friends who have borrowed money from each other
- Minimum Cost to cut a board into squares
- Check if it is possible to survive on Island
- Find maximum meetings in one room

Backtracking

- Rat in a maze Problem
- Printing all solutions in N-Queen Problem
- Word Break Problem using Backtracking
- Remove Invalid Parentheses
- Sudoku Solver
- m Coloring Problem
- Print all palindromic partitions of a string
- Subset Sum Problem
- The Knight’s tour problem
- Tug of War
- Find shortest safe route in a path with landmines
- Combinational Sum
- Find Maximum number possible by doing at-most K swaps
- Print all permutations of a string
- Find if there is a path of more than k length from a source

Stacks & Queues

- Implement Stack from Scratch
- Implement Queue from Scratch
- Implement 2 stack in an array
- find the middle element of a stack
- Implement "N" stacks in an Array
- Check the expression has valid or Balanced parenthesis or not.
- Reverse a String using Stack
- Design a Stack that supports getMin() in O(1) time and O(1) extra space.
- Find the next Greater element
- The celebrity Problem
- Arithmetic Expression evaluation
- Evaluation of Postfix expression
- Implement a method to insert an element at its bottom without using any other data structure.
- Reverse a stack using recursion
- Sort a Stack using recursion
- Merge Overlapping Intervals
- Largest rectangular Area in Histogram
- Length of the Longest Valid Substring
- Expression contains redundant bracket or not
- Implement Stack using Queue

Heap

- Implement a Maxheap/MinHeap using arrays and recursion.
- Sort an Array using heap. (HeapSort)
- Maximum of all subarrays of size k.
- “k” largest element in an array
- Kth smallest and largest element in an unsorted array
- Merge “K” sorted arrays. [ IMP ]
- Merge 2 Binary Max Heaps
- Kth largest sum continuous subarrays
- Leetcode- reorganize strings
- Merge “K” Sorted Linked Lists [V.IMP]

Graphs

- Create a Graph, print it
- Implement BFS algorithm
- Implement DFS Algo
- Detect Cycle in Directed Graph using BFS/DFS Algo
- Detect Cycle in UnDirected Graph using BFS/DFS Algo
- Search in a Maze
- Minimum Step by Knight
- flood fill algo
- Clone a graph
- Making wired Connections
- word Ladder
- Dijkstra algo
- Implement Topological Sort
- Minimum time taken by each job to be completed given by a Directed Acyclic Graph
- Find whether it is possible to finish all tasks or not from given dependencies
- Find the no. of Isalnds
- Given a sorted Dictionary of an Alien Language, find order of characters
- Implement Kruksal’sAlgorithm
- Implement Prim’s Algorithm
- Total no. of Spanning tree in a graph
- Implement Bellman Ford Algorithm
- Implement Floyd warshallAlgorithm
- Travelling Salesman Problem
- Graph ColouringProblem
- Snake and Ladders Problem
- Find bridge in a graph
- Count Strongly connected Components(Kosaraju Algo)
- Check whether a graph is Bipartite or Not
- Detect Negative cycle in a graph
- Longest path in a Directed Acyclic Graph

Trie

Dynamic Programming

- Coin ChangeProblem
- Knapsack Problem
- Binomial CoefficientProblem
- Permutation CoefficientProblem
- Program for nth Catalan Number
- Matrix Chain Multiplication
- Edit Distance
- Subset Sum Problem
- Friends Pairing Problem
- Gold Mine Problem
- Assembly Line SchedulingProblem
- Painting the Fenceproblem
- Maximize The Cut Segments
- Longest Common Subsequence
- Longest Repeated Subsequence
- Longest Increasing Subsequence
- Space Optimized Solution of LCS
- LCS (Longest Common Subsequence) of three strings
- Maximum Sum Increasing Subsequence
- Count all subsequences having product less than K
- Longest subsequence such that difference between adjacent is one
- Maximum subsequence sum such that no three are consecutive
- Egg Dropping Problem
- Maximum Length Chain of Pairs
- Maximum size square sub-matrix with all 1s
- Maximum sum of pairs with specific difference
- Min Cost PathProblem
- Maximum difference of zeros and ones in binary string
- Minimum number of jumps to reach end
- Minimum cost to fill given weight in a bag

Bit Manipulation