===============================
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
===============================
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
===============================
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
===============================
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
===============================
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
===============================
Sorting Questions
===============================
===============================
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
===============================
===============================
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.
===============================
Pattern Searching Matrix Questions
===============================
===============================
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
===============================
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
===============================
Hashing Questions
===============================
===============================
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.
===============================
Divide and conquer Questions
===============================
Divide and Conquer: Implement pow(x, n), which calculates x raised to the power n (xn) in C++
Dynamic Programming: Find the Maximum and minimum of an array
===============================
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
===============================
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
===============================
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
===============================
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
===============================
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
===============================
Sliding Window Questions
===============================
Sliding Window: Strings: Smallest distinct window
Sliding Window: Strings: Minimum Window Substring