===============================
Arrays Questions
===============================
Arrays: Sort an array of 0s, 1s and 2s in C
Arrays: Given an unsorted array, find the minimum difference between 2 elements.
Arrays: Given an unsorted integer array, find the smallest missing positive integer.
Arrays: Given an array, find all the repeated elements in C language.
Arrays: Given an integer value, convert it into roman number.
Arrays: Given a string, and number of rows, write the string in zigzag pattern.
Arrays: Find the Container with Most Water explanation with diagram and solution
Arrays: Merge Intervals in C++
Arrays: Given two integers n and k, return all possible combinations of k numbers out of 1 … n.
Arrays: Given a set of distinct integers, nums, return all possible subsets (the power set).
Arrays: Given a non-negative integer numRows, generate the first numRows of Pascal’s triangle.
Arrays: Given a triangle, find the minimum path sum from top to bottom.
Arrays: Best time to buy sell stock
Arrays: Find the minimum element from an array that is sorted and is rotated, solution in C++
Arrays: Given an array, find the majority element, solution in C++
Arrays: Find the k’th smallest/largest element in an array
Arrays: Move all the negative number in beginning
Arrays: Find the union and intersection of two sorted arrays
Arrays: Given an array, rotate it one time
Arrays: Minimize the maximum difference between the heights
Arrays: Merge Two Sorted arrays without using extra space
Arrays: Inversion Count in an Array
Arrays: Find common element in 3 sorted arrays.
Arrays: Rearrange the array with one positive and one negative number.
Arrays: Find whether an array is subset of another array
Arrays: Find a triplet that sum to a given value
Arrays: Three way partitioning of an array around a given range
Arrays: Find the median of 2 sorted arrays of same size
Arrays: Merge sorted array inplace
Arrays: Find triplet with minimum sum
Arrays: Program to check if an Array is Palindrome or not
Arrays: Check if 3 consecutive odds exist
Arrays: Check If N and Its Double Exist
Arrays: Find unique numbers that sum upto zero
Arrays: Find numbers with even number of digits
Arrays: Product of array except itself
Arrays: Given a sorted array return the absolute distinct count.
Arrays: Create a data structure for n elements and constant operations
Arrays: Cell state after K days
Arrays: Find the minimum number to an array so the sum becomes even
Arrays: Convert an array into permutation of numbers from 1 to N.
Arrays: Given an array and a number n, rotate the array by n steps to its right.
Arrays: Print in a Circular Array
Arrays: Find the closest greater element for every array element from another array
Arrays: Given an array, find minimum number of swaps required to sort the array
Arrays: Given an array, find the minimum operations to make binary array to one
Arrays: Given an array, move all the negative number to the end by preserving the relative order.
Arrays: Get minimum number of moves to sort an array
Arrays: Given a string, reverse all the vowels in the string
Arrays: Given an array, check if it has any duplicate elements, 2 solutions
Arrays: Given an array, and value K find the k th distinct element among unique elements in an array
Arrays: Given a sorted array, find the starting and ending index that matches the target
Arrays: Given a string, reverse the string.
Arrays: Implement prefix sum array
===============================
Strings Questions
===============================
Strings: Group Anagrams in C++
Strings: Given a 2D board and a word, find if the word exists in the grid.
Strings: check if the given string is valid or not explanation with solution
Strings: Given a string s, partition s such that every substring of the partition is a palindrome.
Strings: You are given a sentence, reverse the string word by word
Strings: Given 2 strings, check if they are isomorphic strings.
Strings: Print all the duplicates in a string
Strings: Program to check if strings are rotations of each other or not
Strings: Longest Repeating Subsequence
Strings: Given a string, print all the subsequence
Strings: Permutations of a given string
Strings: Divide binary string into sub strings with equal number of 0s and 1s.
Strings: Check balanced parenthesis
Strings: Convert a string into its mobile numeric keypad
Strings: Get the minimum number of inversions needed to make an expression balanced
Strings: Count the number of string in 2D character array
Strings: Convert Roman Numerals to Decimal
Strings: Longest Common Prefix
Strings: Minimum number of flips to make binary string alternate
Strings: Find the first repeated word in a string
Strings: Minimum swaps required for bracket balancing
Strings: Find the longest common subsequence between two strings.
Strings: Minimum characters to be added at beginning to make string palindrome
Strings: Remove all consecutive duplicates from the string
Strings: Find minimum operations required to transform a string into another string
Strings: Recursively print all sentences that can be formed from list of word lists
Strings: Remove all consecutive duplicates from the string
Strings: Given a string convert into its equivalent ASCII form
Strings: Second most repeated word in a sequence
Strings: Convert Postfix to Infix
Strings: Longest Prefix Suffix
Strings: Calculate the basic arithmetic expression as string
Strings: Calculate an expression with * and /
Strings: Given an encoded string, decode string
Strings: Number of Different Integers in a String
Strings: Longest Substring Of All Vowels in Order
Strings: Minimum Number of Swaps to Make the Binary String Alternating
Strings: Longer Contiguous Segments of Ones than Zeros
Strings: Check if Word Equals Summation of Two Words
===============================
BitMagic Questions
===============================
Bitwise Operators: Reverse Bits
Bitwise Operators: Count the number of set bits
Bitwise Operators: Missing Number
Bitwise Operators: Counting set bits in a number
Bitwise Operators: Hamming Distance
Bitwise Operators: Bitwise and of number range
Bitwise Operators: Find the two non repeating numbers.
Bitwise Operators: Count number of bits to be flipped to convert A to B
Bitwise Operators: Bitwise Set bit questions
Bitwise Operators: Copy set bits in a range
Bitwise Operators: Given a binary number, return the 1’s and 2’s complement of that number
Bitwise Operators: Add and subtract 2 numbers using bitwise operators.
Bitwise Operators: Perform below operations using Bitwise Operators
Bitwise Operators: Perform below swapping operations using Bitwise operators
Bitwise Operators: Perform multiplication operation using Bitwise operators
Bitwise Operators: Print the numbers without consecutive 1s in binary representation
Bitwise Operators: Add 1 to a given number
Bitwise Operators: Program to reverse the bits of a number
Bitwise Operators: Given a number, check if the number in its binary representation is palindrome
Bitwise Operators: Print the binary representation of a given number.
Bitwise Operators: Given 2 integers, perform bitwise recursive addition of integers
Bitwise Operators: Toggle all even bits of a number
Bitwise Operators: Given a number “n”, calculate xor of 1 to n
Bitwise Operators: Given a binary string, check the divisibility of the string by 2^k
Bitwise Operators: Check if the given number is sparse or not
Bitwise Operators: Given a number, check if all the bits of the number are set
Bitwise Operators: Given a number, check if the number has same set and unset bits.
Bitwise Operators: Given a number, check if it has 2 adjacent set bits
Bitwise Operators: Bitwise AND of all even number from 1 to N
Bitwise Operators: Given a number, check if it is divisible by 8
Bitwise Operators: Bitwise Operations Tricks
===============================
Linked List Questions
===============================
Linked List: Remove Nth Node from End of List
Linked List: Swap Nodes in Pairs solution in C
Linked List: Merge k sorted linked lists and return it as one sorted list in C++
Linked List: Reverse Linked List iterative and recursive in C++
Linked List: Intersection of Two Linked Lists in c++
Linked List: Rotate linked list by k nodes
Linked List: Remove Duplicates from Sorted List solution in CPP
Linked List: Reverse a linked list from position m to n. Do it in one-pass.
Linked List: Given a linked list, determine if it has a cycle in it.
Linked List: Reorder list in to alternate nodes like first lowest and first highest.
Linked List: Sort a linked list using insertion sort.
Linked List: Given an unsorted linked list, sort the list using merge sort.
Linked List: Given a linked list, check if it is a palindrome or not. Solution in C++
Linked List: Reverse Linked List in groups
Linked List: Remove duplicates from an unsorted linked list
Linked List: Move last element to front of a given Linked List
Linked List: Add 1 to the linked list
Linked List: Find middle element in Linked List
Linked List: Split circular Linked List into two halves
Linked List: Program to Check if a Singly Linked List is Palindrome
Linked List: Deletion from a Circular Linked List
Linked List: Reverse a Doubly Linked List
Linked List: Find pairs with a given sum in a DLL.
Linked List: Count triplets in a sorted DLL whose sum is equal to given value “k”.
Linked List: Sort a “k”sorted Doubly Linked list
Linked List: Rotate Doubly linked list by N nodes
Linked List: Rotate a Doubly Linked list in group of Given Size
Linked List: Flatten a Linked List
Linked List: Multiply two numbers represented by Linked Lists
Linked List: Delete nodes which have a greater value on right side using recursion
Linked List: Segregate even and odd nodes in a Linked List
Linked List: Odd Even Linked List
Linked List: Perform binary search on a singly linked list
Linked List: Perform bubble sort on singly linked list
Linked List: Perform below operations on Circular Singly Linked List:
Linked List: Perform below delete operations from single linked list.
Linked List: Perform below delete operations from single linked list.
Linked List: Perform below operations from a circular linked list
Linked List: Given a linked list convert into peak list
Linked List: Perform bubble sort on Double linked list
Linked List: Check if a doubly linked list of characters is palindrome or not
Linked List: Perform the below delete operations on a Doubly Linked List
Linked List: Sort a nearly sorted doubly linked list
Linked List: Split a circular linked list into two halves
Linked List: Copy a linked list with given next and random pointer
Linked List: Given 2 linked list by choosing max element at each position
Linked List: Given a binary tree, convert into circular doubly linked list
Linked List: Convert a single linked list to circular linked list
Linked List: Count the number of rotations in sorted and rotated linked list
Linked List: Given a DLL, delete all the nodes that is greater than the given value
Linked List: Sort a linked list of 0, 1, 2
Linked List: Given a circular linked list, exchange first and last node
Linked List: Find 3 nodes whose sum equal to a given number
Linked List: Given a LL, find the kth node from middle towards the head
Linked List: Given 2 LL, find the first common element
Linked List: Insert node into the middle of the linked list
Linked List: Given Linked list and a value K, partition the list
===============================
Stack Questions
===============================
Stack: Given an expression in reverse polish notation, evaluate it and get the output in C++
Stack: C++ program to implement queue using stacks.
Stack: Implement two stacks in an array
Stack: Delete the middle element from the stack.
Stack: Check for balanced brackets using stack
Stack: Evaluate postfix expression
Stack: Insert at the end of stack
Stack: Reverse a stack using recursion
Stack: Largest Rectangular Area in a Histogram
Stack: Length of the longest valid substring
Stack: Expression contains redundant bracket or not
Stack: Implement Stack using Queues
Stack: Check if a stack is a permutation of another stack
Stack: Reverse the first “K” elements of a queue
Stack: Design a stack that returns the minimum element in constant time.
Stack: Get the min element of the stack in O(1) time
Stack: Get the next greater element in a circular array
Stack: Check if given 2 strings are same with backspace character
Stack: Remove outer most redundant parenthesis
Stack: Remove All Adjacent Duplicates In String
Stack: Build an Array With Stack Operations
Stack: Make digit minimum by removing k digits.
Stacks: Minimum Insertions to Balance a Parentheses String
Stacks: Check if the given pattern exist in the array
Stacks: Validate stack operations
Stack: Convert Infix to Postfix Expression
Stack: Postfix and prefix conversion
Stack: Prefix to infix conversion
Stack: Prefix to postfix conversion
Stack: Nearest smaller numbers on left side in an array
Stack: Given an array, you need to find the previous greater element
Stack: Reversing the first K elements of a Queue
Stack: Sort a stack using a temporary stack
Stack: Sort a stack using recursion
Stack: Check if stack elements are pairwise consecutive
Stack: Check if the expression contains redundant bracket or not
Stack: Check if a queue can be sorted into another queue using a stack
Stack: Check if an array is stack sortable
Stack: Check if concatenation of two strings is balanced or not
Stack: Check if valid parentheses in an expression
Stack: Merge and sort 2 unsorted array
Stack: Given a string expression, check if it is balanced expression
Stack: Given 2 arrays, check if an array is stack permutation of another
Stack: Given a string with balanced brackets, you need to print the bracket number
Stack: Delete consecutive same words in a sequence
Stack: Delete middle element of a stack
Stack: Given an expression, get the minimum bracket reversal to make the expression balanced
===============================
Searching and Sorting Questions
===============================
Searching and Sorting: Maximum and minimum of an array using minimum number of comparisons
Searching and Sorting: Search an array where adjacent differ by at most k
Searching and Sorting: Count all distinct pairs with difference equal to k
Searching and Sorting: Maximum sum such that no two elements are adjacent
Searching and Sorting: Merge 2 sorted arrays
Searching and Sorting: print all subarrays with 0 sum
Searching and Sorting: Product of array except itself.
Searching and Sorting: Sort Integers by The Number of 1 Bits
Searching and Sorting: Minimum number of swaps required to sort an array
Searching and Sorting: K-th Element of Two Sorted Arrays
Searching and Sorting: Find the missing number in Arithmetic Progression
Searching and Sorting: Factorial Trailing Zeroes
Searching and Sorting: Find the smallest and second smallest elements in an array
Searching and Sorting: Find the majority element in the array
Searching: Find all the triplets with zero sum
Searching: Check the ceiling in a sorted array
Searching: Check if all occurrence if a character appear together
Searching: Get the Pythagorean Triplet in an array
Searching: Given two arrays, generate third array with the given constraints
Searching: Count the number of 1s in a sorted binary array
Searching: Count number of occurrence in a sorted array
Searching: Find median of two sorted array of different sizes
Searching: Allocate minimum pages
Searching: Find fixed point in the given array
Searching: Given an number, find the numbers whose factorials end with n zeros
Searching: Find the closest number in the sorted array
Searching: Find the value and its double in the array
Searching: Given a string and a key, find the smallest letter that is greater than the key
Searching: Given an sorted rotated array, find the given key is present
Searching: Find index of an extra element in a sorted array
Searching: Given an array, find the largest pair sum
Searching: Find the k maximum elements of an array in original array.
Searching: Find the missing elements of 2 sorted arrays
Searching: Find the missing number
Searching: Given an array, find the first and last position of an element in sorted array
Searching: Given an array, split into n arrays to minimize the maximum sum of all sub arrays
===============================
Sorting Questions
===============================
Sorting: Given an array, sort the elements alternatively
Sorting: Get union of 2 sorted arrays
Sorting: Given an array, return the number of steps required to make array elements same
Sorting: Given an array, count inversions
Sorting: Given 2 arrays, return minimum number of platforms required for a railway station
Sorting: Minimum increment to make array unique
Sorting: Merge 2 sorted arrays
Sorting: Check if any interval completely overlaps other
Sorting: Given an array, you need to check if it has contiguous integers
Sorting: Given an array, minimize sum of product of consecutive pairs
Sorting: Check if reversing sub array make the array sorted
Sorting: Check if two arrays are equal or not
Sorting: Check if the array is Arithmetic Progression
Sorting: Check if a given array is K sorted or not
Sorting: Check if the array can be fit into another array by re-arranging the elements.
Sorting: Merge two sorted arrays without extra space.
Sorting: Given a string, sort it by frequency of characters
Sorting: Get the intersection of 2 arrays
Sorting: Sort an array having partially sorted and partially unsorted array
Sorting: Given an array, you need to remove the elements to make the array as sorted.
Sorting: Find minimum difference between any two elements in a array
Sorting: Print elements occurred only once in the array
Sorting: Find the missing element of a range in an array
Sorting: Find a pair with maximum product in array of integers
===============================
Binary Searching Questions
===============================
Binary Search: Search a 2D Matrix in C++
Binary Search: Binary search on an array that is in descending order
Binary Search: Order-Agnostic Binary Search
Binary Search: Find the first and last occurrence of an element
Binary Search: Find the number of times a Sorted array is Rotated
Binary Search: Searching in a Nearly Sorted Array
Binary Search: Find Floor of an element in a Sorted Array
Binary Search: Find Ceil of an element in a Sorted Array
Binary Search: Find position of an element in an Infinite Sorted Array
Binary Search: Find the index of first 1 in an infinite sorted array of 0s and 1s
Binary Search: Find maximum element in Bitonic Array
Binary Search: Search An Element in Bitonic Array
Binary Search: Get the rotation count in sorted rotated array
Binary Search: Count the number of 1’s in an array sorted in decreasing order.
Binary Search: Searching and Sorting: Get the fixed point in an array
===============================
Queue Questions
===============================
Queue: Given a Linked list, construct a complete binary tree
Queue: Sort a queue without using extra space
Queue: Reverse first K elements in the queue
Queue: Implement priority queue using Linked List
Queue: Find the first non repeating character in the stream
Queue: Given a queue, reverse it
Queue: Given a queue and element k, revert the first k element of the queue
Queue: Implement dequeue using doubly linked list
Queue: Implement queue using stacks
Queue: Given a queue, interleave first half of the queue with second half
Queue: Given a queue, check if queue can be sorted using stack
Queue: Given 2 sorted arrays, you need to merge them using priority queue
Queue: Reverse a stack using queue
Queue: Maximum of all subarrays of size K
===============================
Matrix Matrix Questions
===============================
Matrix: You are given an n x n 2D matrix rotate it by 90 degrees (clockwise) in C++.
Matrix: Search a 2D Matrix in C++
Matrix: Check if the given board is valid Sudoku or not explanation with solution in CPP
Matrix: Find median in a row wise sorted matrix.
Matrix: Find a row with maximum number of 1’s in a binary matrix
Matrix: Kth smallest element in a sorted matrix
Matrix: Get the common elements in all row of a matrix.
Matrix: Find pair with maximum sum in the matrix.
Matrix: Check if the matrix is Bisymmetric matrix or not
Matrix: Given a matrix, print the boundary elements
Matrix: Given a matrix, check if it is skew symmetric or not
Matrix: Given a matrix, rotate matrix 180 degree
Matrix: Given a matrix, you need to find the sum of diagonals of a matrix.
Matrix: Given a matrix, check if it is a magic square or not
Matrix: Given a matrix, find the transpose of the matrix
Matrix: Given a matrix, check if the matrix is sparse or not
Matrix: Given a matrix, check if all rows of a matrix are circular rotation of each other
Matrix: Given a matrix, check if the sum of ith row and ith column are same
Matrix: Given a matrix, check if it is orthogonal or not
Matrix: Find common elements in all rows of a given matrix
Matrix: Given a matrix, count the number of sorted rows
Matrix: Given a matrix, count the majority element
Matrix: Given a matrix, find the saddle point
Matrix: Given a binary matrix, find the rows with max 1s
Matrix: Given a matrix, count zero in row wise and column wise matrix
Matrix: Given a 2D matrix, find the peak element.
Matrix: Given a matrix, set it to zero
===============================
Recursion Questions
===============================
Recursion: Given a collection of distinct integers, return all possible permutations.
Recursion: Implement pow(x, n), which calculates x raised to the power n (xn) in C++
Recursion: Count the ways to decode a digit sequence
Recursion: Get the nth Fibonacci Number
Recursion: Get the least number of perfect squares
Recursion: Convert a given decimal number into binary using recursion
Recursion: Reverse the queue using recursion
Recursion: Given two numbers, add them recursively
Recursion: Check if a number is palindrome using recursion
Recursion: Print N to 1 using recursion
Recursion: Print alternate node in a Linked List using recursion
Recursion: Given a string and a sub-string, count the number of occurrence recursively.
Recursion: Given a number, count the number of ways to express a number as sum of powers.
Recursion: Given a decimal number, convert into binary number using recursion
Recursion: Given a stack, delete the middle element using recursion
Recursion: You are given a stack, reverse it using recursion
Recursion: Given a linked list, find the middle element recursively
Recursion: Given a number, generate all binary strings.
Recursion: Given a string, find the occurrence of first uppercase letter in the string.
Recursion: Remove adjacent duplicates in the string.
Recursion: Given an array, generate all sub arrays using recursion
Recursion: Remove K adjacent duplicate in a string
Recursion: Given a number, return the sum of digit
Recursion: Given 2 numbers find the product of the numbers, using recursion
Recursion: Given a number, count the number of set bits using recursion
===============================
Heaps Questions
===============================
Heaps: Build Min Heap from an Array
Heaps: Sort an Array using heap
Heaps: Find kth smallest in an unsorted array
Heaps: Merge “K” sorted arrays
Heap: Return k largest element
Heap: Sort a K sorted array or nearly sorted array
Heap: Connect ropes with minimum cost
Heap: Sum of all the elements between k1 and k2 smallest elements
Heap: kth largest element in a stream
Heap: Max Heap and Min heap using Priority Queue
Heap: Given an array and a value K, return the kth smallest element
Heap: Given two max heaps, merge them
Heap: Given a BST, convert into Min Heap
Heap: Check if given a binary tree is a Heap
Heap: Convert Min Heap to Max Heap
Heap: Given an array, sort the array using min heap
Heap: Given an array, check if the array represents Binary Max Heap
Heap: Given level order traversal of Binary Tree, check if the tree is Min Heap
Heap: K Closest Points To Origin
Heap: Find the minimum product of k integers in an array
Heap: Given an array, find the kth largest element in the array
Heap: Given an array, find the top K frequency elements
Heap: Given an array, find the kth smallest pair sum
===============================
Hashing Questions
===============================
Hashing: You are given an array, you need to return kth distinct element
Hashing: Longest consecutive sequence
Hashing: Given an array, check if the array is a permutation of numbers from 1 to N.
Hashing: Given a array, you need to find a duplicate within k distance in the array.
Hashing: Given a string, check if it is isogram or not
Hashing: Given an array, find two non overlapping pairs having equal sum
Hashing: Given 2 strings, find uncommon characters
Hashing: Replace all the elements of the array by its rank in the array
Hashing: Given a sorted array, count the absolute distinct count
Hashing: Given 2 arrays, check if they are equal or not
Hashing: Given two arrays, sort first array according to the order of second array
Hashing: Find the first repeating element and index in the array
Hashing: Given an array, find the first missing positive number
Hashing: Given an array, find the majority element
Hashing: Given an array, find the element that occurs odd number of times
Hashing: Given an array and a value k, return top k frequent elements
Hashing: Given an array, you need to find the missing number
Hashing: Given an array, count all the subsets with even numbers and are distinct
Hashing: Given an array, you need to count the frequency if the array elements
===============================
Dynamic Programming Questions
===============================
Dynamic Programming: Longest Palindromic Substring In C++
Dynamic Programming: Rain water trapping
Dynamic Programming: Unique Paths Solution in CPP
Dynamic Programming: Unique Paths 2
Dynamic Programming: Minimum Path Sum in CPP
Dynamic Programming: Longest Increasing Subsequence
Dynamic Programming: Longest Bitonic Subsequence
Dynamic Programming: Get Max Coin In Game problem.
Dynamic Programming: Rod Cutting Problem
Dynamic Programming: Box Stacking Problem
Dynamic Programming: Building Bridges
Dynamic Programming: Egg Dropping Problem
Dynamic Programming: Min Edit Distance
Dynamic Programming: 0 1 Knapsack Problem using Dynamic Programming
Dynamic Programming: Binomial Coefficiet Problem
Dynamic Programming: Permutation Coefficient
Dynamic Programming: Get the nth catalan number
Dynamic Programming: Subset sum problem
Dynamic Programming: Unbounded Knapsack Problem
Dynamic Programming: Equal Sum partition
Dynamic Programming: Climb the stairs with minimum cost
Dynamic Programming: Robbing Houses
Dynamic Programming: Get the sum by deleting elements from the array
Dynamic Programming: Count of subset sum with a given sum
Dynamic Programming: Minimum subset difference
Dynamic Programming: Target Sum
Dynamic Programming: Count the number of subset with a given difference
Dynamic Programming: Minimum Number of swaps to make array increasing
Dynamic Programming: Longest Common Subsequence
Dynamic Programming: Print Longest Common Sub-sequence
Dynamic Programming: Length of Shortest Common Supersequence
Dynamic Programming: Print Shortest Common Supersequence
Dynamic Programming: Minimum number of deletions and insertions to convert one string into another
Dynamic Programming: Longest repeating subsequence
Dynamic Programming: Check if one string is a subsequence of another
Dynamic Programming: Count how many times string 1 appears as substring in string 2.
Dynamic Programming: Longest Common Substring
Dynamic Programming: Get the count of delete operations on 2 strings.
Dynamic Programming: Find the Maximum and minimum of an array
===============================
Divide and conquer Questions
===============================
Divide and Conquer: Implement pow(x, n), which calculates x raised to the power n (xn) in C++
===============================
Backtracking Questions
===============================
Backtracking: Letter Combinations of a Phone Number
Backtracking: Subsets II in CPP
Backtracking: Partition string into its palindrome
Backtracking: Get the k combination from an array of 1 to n
Backtracking: Find combination sum of k numbers that sum up to n
Backtracking: Letter case permutation
Backtracking: Get the sequential digits from the given range
Backtracking: Return the number of queens possible in a chessboard
Backtracking: Partition to K Equal Sum Subsets
Backtracking: Get maximum sum in a matrix
===============================
Binary Trees Questions
===============================
Binary Trees: Get difference between values at Even and Odd level in a binary tree
Binary Tree: Get Number of Nodes in a Binary Tree
Binary Tree: Display nodes at given level in Binary Tree
Binary Tree: Display Reverse Level Order Traversal by using queue
Binary Tree: Perform PreOrder traversal on a Binary Tree by without Recursion
Binary Tree: Perform InOrder traversal on a Binary Tree by without Recursion
Binary Tree: Perform PostOrder traversal on a Binary Tree by without Recursion
Binary Tree: Convert a binary tree to its Mirror Tree
Binary Tree: Check if Two Trees are Mirror Structure to each other
Binary Tree: Delete a binary tree
Binary Tree: Get Level of a Given Node
Binary Tree: Get Sum of elements Level wise in a Binary Tree
Binary Tree: Get Maximum width of Binary Tree
Binary Tree: Display elements between any two given level
Binary Tree: Check if binary tree is a height balanced tree?
Binary Tree: Check if all Leaf Nodes are at same level in Binary tree
Binary Tree: Find Parent of a given node value in Binary Tree
Binary Tree: Check if given Binary Tree is BST
Binary Tree: Find Sibling node of a given node value in Binary Tree
Binary Tree: Check if given two nodes are siblings to each other in Binary Tree
Binary Tree: Get Sum of all nodes formed from Root to Leaf Path
Binary Tree: Get Average of all nodes in Binary Tree
Binary Tree: Get Sum of all Leaf Nodes in Binary Tree
Binary Tree: Find Maximum or Minimum in Binary Tree
Binary Tree: Check if Binary Tree is Foldable Tree
Binary Tree: Check if two Binary Trees are Isomorphic
Binary Tree: Get Vertical Sum of Binary Tree
Binary Tree: Get deepest Left Leaf Node in Binary Tree
Binary Tree: Get depth of Odd level which contains Leaf node in Binary Tree
Binary Tree: Display all the leaf nodes from left to right and right to left in a tree
Binary Tree: Get count Non-Leaf nodes in a Binary Tree
Binary Tree: Get the count full nodes in a Binary
Binary Tree: Bottom view of binary Tree
Binary Tree: Boundary Traversal of Binary Tree
Binary Tree: Top view of a binary tree
Binary Tree: Left view and right view of a Binary Tree
Binary Tree: Level Order Traversal
Binary Tree: Vertical Order Traversal
Binary Tree: Height or Max depth if a BTree
Binary Tree: Spiral order or Zigzag traversal of a Binary Tree
Binary Tree: Diameter of a Binary Tree
Binary Tree: Lowest Common ancestor of a Binary Tree.
Binary Tree: Check if 2 nodes are mirror of each other
Binary Tree: Check if 2 binary tree are identical
Binary Tree: Check if binary tree is a sum tree
Binary Tree: Add all the node values in a Binary Tree or Sum of a Binary tree
Binary Tree: Print the number of leaf nodes in a binary tree
Binary Tree: Print all the paths from root node to leaf node
Binary Tree: Print the nodes at k distance from the root of a binary tree
Binary Trees: Diagonal Traversal of a Binary tree
Binary Trees: Convert Binary Tree to DLL
Binary Trees: Convert Binary tree into Sum tree
Binary Trees: Construct Binary Tree from preorder and inorder traversal
Binary Trees: Minimum swap required to convert binary tree to binary search tree
Binary Trees: Find Duplicate Subtrees
Binary Trees: Check if a given graph is tree or not
Binary Trees: Find largest subtree sum in a tree
Binary Trees: Maximum Sum of nodes in Binary tree such that no two are adjacent
Binary Trees: Kth Ancestor of a Tree Node
Binary Trees: Find Duplicate Subtrees
Binary Tree: Given a tree, delete leaf nodes with value k
Binary Tree: Given a binary tree, check if the tree is perfect or not.
Binary Tree: Maximum path sum in a binary tree
Binary Tree: Given a binary tree, perform reverse level order traversal
Binary Tree: Convert BST to Min Heap
Binary Tree: Given a BST and a target, find if a pair exists
Binary Tree: Convert BST to Max Heap
Binary Tree: Level order traversal of a Binary Tree
Binary Tree: Given a binary tree, connect nodes at the same level
Binary Tree: You are given a binary tree, you need to print the extreme nodes in alternate order.
Binary Tree: Given two trees, check if the structure are identical
Binary Tree: Given a binary tree and a value k, print all the nodes at distance k
Binary Tree: Given a binary tree, find the maximum path sum between two leaves
Binary Tree: Given a binary tree and a target, delete leaf nodes having value target
Binary Tree: Given a binary tree and a target, burn it
Binary Tree: Given a binary tree, check if the tree is a children sum property
Binary Tree: Given a binary tree, check if duplicate values are present
Binary Tree: Given two trees, check if the tree is subtree of another tree
Binary Tree: Given a binary tree and two nodes, check if they are cousins
Binary Tree: Given a binary tree, invert it
===============================
Graph Questions
===============================
Graph: Detect a cycle in a directed graph
Graph: Detect a cycle in a undirected graph
Graph: Check if the given edge is a bridge in the graph
Graph: Check if undirected graph is connected or not
Graph: Count the number of connected components in an undirected graph
Graph: Reverse a directed graph
Graph: Check if the undirected graph is a tree or not
Graph: Given an directed graph, find the in and out degree of all vertices
Graph: Find there is a path between 2 nodes in a directed graph
Graph: Get the maximum sum of values of nodes among all connected components of an undirected graph
Graph: Get the unique lengths of connected components of an undirected graph.
Graph: Find if there is a path between 2 nodes in an undirected graph
Graph: Check if a graph is a strongly connected using Kosaraju DFS algorithm
Graph: Find the number of Islands
Graph: Check if the given courses can be completed with prerequisites
Graph: Given a graph, check if it is bipartite or not – Using BSF
Graph: Given a graph with source and destination, count all the possible path between two vertices
Graph: Given a matrix, find the distance of nearest cell having 0
Graph: Find minimum time to rot all the oranges
Graph: Get all the paths from source to destination
Graph: Given a matrix, replace ‘o’ with ‘x’, if surrounded by ‘x’
Graph: You are given a graph, clone the graph using deep copy
Graph: Given a dictionary and a matrix, find all the words from the dictionary found in matrix
Graph: Given a binary matrix, find the largest region of 1
Graph: Given a matrix, find the number of closed islands
===============================
Binary Search Trees Questions
===============================
Binary Search Trees: Find a value in a BST
Binary Search Trees: Deletion of a node in a BST
Binary Search Trees: Find min and max value in a BST
Binary Search Trees: Find the Inorder predecessor and successor for a given key in BST
Binary Search Trees: A program to check if a binary tree is BST or not
Binary Search Trees: Convert a BST into greater sum tree
Binary Search Trees: LCA in a BST
Binary Search Trees: Construct BST from preorder traversal
Binary Search Trees: Convert Binary Tree into Binary Search Tree.
Binary Search Trees: Convert a normal BST into a Balanced BST
Binary Search Trees: Merge Two balanced BST
Binary Search Trees: Kth Largest Element in a BST
Binary Search Trees: Kth smallest Element in a BST
Binary Search Trees: Return the sum of given range in BST.
Binary Search Trees: Get the Shortest distance between two nodes in BST
Binary Search Trees: Count the number of BST nodes that lie in a given range.
Binary Search Trees: Convert sorted DLL to Balanced BST
Binary Search Trees: Find triplet sum in BST
Binary Search Trees: Check if the pre-order is a valid BST
Binary Search Trees: Check if the BST has a dead end
Binary Search Trees: Correct a BST where 2 nodes are swapped
Binary Search Trees: Flatten BST to sorted list
Binary Search Tree: Unique Binary Search Trees
Binary Search Trees: Given a sorted linked list into binary search tree
Binary Search Trees: Check If Preorder Traversal Is Valid BST
Binary Search Trees: Given an array, check if it represents inorder traversal of BST.
Binary Search Trees: Given a BST, check if each internal node has only one child
Binary Search Trees: Given 2 BST, check if it has same set of elements or not
Binary Search Trees: Given a BST and a key, find the next smaller element of that key
Binary Search Trees: Given a BST and a key, find the next greater element of that key
Binary Search Trees: Given a BST and a range, return the range sum of that BST
Binary Search Trees: Given two BST, print all elements
Binary Search Trees: Given a BST, find median in BST
Binary Search Trees: Given 2 BST, check if both contain same set of elements
Binary Search Trees: Given a BST, remove all the leaf nodes
Binary Search Trees: Given a BST and a key, search in a BST
Binary Search Trees: Given a sorted array, convert into balanced bst
Binary Search Trees: Given 2 BST, print common nodes in the BST
Binary Search Trees: Given a BST, find the second largest element in the BST
===============================
Greedy Questions
===============================
Greedy: Remove duplicates from a string
Greedy: Add elements in an array so the sum is equal to the given range
Greedy: Remove k digits from an number to make it a smallest integer.
Greedy: Get the minimum platforms needed to avoid delay in the train arrival.
Greedy: Check if the string is a substring of another string
Greedy: Remove overlapping intervals.
Greedy: Plant n flowers in flower bed
Greedy: Maximum meetings in one room
Greedy: Schedule task efficiently
Greedy: Shuffle array so that one array element is greater than other array element
Greedy: Maximum sum of absolute difference of an array
Greedy: Given a string, split into balanced strings.
Greedy: Perform operations on a broker calculator
Greedy: Add minimum to make parentheses valid.
Greedy: Remove covered intervals.
Greedy: Reduce the array size to the half
Greedy: Connect ropes with minimum cost.
Greedy: Find maximum sum possible equal sum of three stacks
Greedy: Maximum odd binary number
Greedy: Assign maximum cookies
Greedy: Given three stacks, you need to find maximum equal sum
Greedy: Non overlapping intervals
Greedy: Minimum swaps to make strings equal
Greedy: Replace the integer to 1 by following given conditions
Greedy: Check for Increasing triplet subsequence
Greedy: Given a string, partition the string such that each letter appears at only one part
Greedy: Given an array, find the longest alternative subsequence
Greedy: Check if a given string becomes palindrome by deleting atmost one char
Greedy: Get the maximum number by swapping once
Greedy: Given an array and a value k, check if we can have k consecutive numbers
Greedy: Given a number and a value k, return the smallest digit after removing k digits
Greedy: Given a string, return the length of longest palindrome
Greedy: Given a string, check if it is a valid parenthesis or not
===============================
2 pointers Questions
===============================
Two Pointers: Rain water trapping
Two Pointers: Reverse an array
Two Pointers: Arrays: Given an array find the duplicate number
Two Pointers: Arrays: Minimum swaps required to bring all elements less than or equal to k together
Two Pointers: Arrays: Get minimum number of merge operations to make an array palindrome
Two Pointers : Move all negative numbers to beginning and positive to end using extra space
Two Pointers: Count pairs with sum less than target
Two Pointers: Given a string with special characters, reverse only alphabets
Two Pointers: Minimum boats to save people
Two Pointers: Given an array, sort the array by making element squares
Two Pointers: Given 2 arrays, find the common elements
Two Pointers: Given a binary array, return maximum consecutive ones
Two Pointers: Given a string, reverse the string by preserving whitespace.
Two Pointers: Given an array and a value k, return the count of pairs with k difference
Two Pointers: Given two arrays find the intersection of two arrays
Two Pointers: Given two arrays with duplicate, you need to return the union of two arrays
Two Pointers: Celebrity Problem
===============================
Sliding Window Questions
===============================
Sliding Window: Strings: Smallest distinct window
Sliding Window: Strings: Minimum Window Substring
Sliding Window: Given a string, get the number of substrings having ‘a’, ‘b’, ‘c’
Sliding Window: Given an array and integer k, find the max sum of distinct subarray of length k
Sliding Window: Given an array and size k, find the first negative integer in each window of size k
Sliding Window: Given an array and a value k, find the maximum average subarray
Sliding Window: Return the maximum consecutive ones after flipping k zeros
Sliding Window: Return the number of sub array size k that is greater than or equal to threshold
Sliding Window: Given a string a variable k, count substring with k frequency characters
Sliding Window: Return he longest length of the substring with consecutive characters
Sliding Window: Maximum consecutive ones by flipping K bits
Sliding Window: Given an array, count maximum number of ones
Sliding Window: Subarrays with k odd numbers
Sliding Window: Longest substring without repeating character
Sliding Window: Longest substring after character replacement
Sliding Window: Return count of subarray with sum equal to k
Sliding Window: Given a string you need to find the longest non repeating substring
Sliding Window: Return length of longest subarray with having at most k frequency
Sliding Window: Fruits into baskets
Sliding Window: Maximum points you can obtain from cards
Sliding Window: Subarray with k different integers
Sliding Window: Smallest sum of contiguous subarray
Sliding Window: Given an array and a target value, get the subarray product less than k
===============================
Merge interval pattern
===============================
Merge interval pattern: Merge Overlapping Intervals
Merge interval pattern: Find intersection of all intervals
Merge interval pattern: Check if two intervals overlap
Merge interval pattern: Check if person can attend all the meetings
Merge interval pattern: Make Intervals Non Overlapping
===============================
Prefix sum problems
===============================
Prefix sum problems: Given an array find Equilibrium Index
Prefix sum problems: Bitwise OR of sum of all subsequence of the array
Prefix sum problems: Maximum equilibrium sum in an array
Prefix sum problems: Get original array from Prefix sum array
Prefix sum problems: Find the largest subarray with sum 0
Prefix sum problems: Longest subarray with sum k
Prefix sum problems: Given an array and value k, return the count of subarray with sum k
Prefix sum problems: Given bianry array and a value k, return the count of subarray sum
===============================
Kadane’s Algorithm
===============================
Kadane’s Algorithm: Maximum Subarray Sum
Kadane’s Algorithm: Maximum Circular Subarray Sum
Kadane’s Algorithm: Maximum Product Subarray
Kadane’s Algorithm: Maximum Subarray Sum after removing at most one element
Kadane’s Algorithm: Maximum Sum Rectangle In A 2D Matrix
Kadane’s Algorithm: Maximum Product Subarray
Kadane’s Algorithm: minimum size subarray sum
Kadane’s Algorithm: Largest sum increasing contiguous subarray
Kadane’s Algorithm: Maximum Product Subarray