In this page I have shared all the questions divided by problem types
Array Related Questions:
Question 2: Sort an array of 0s, 1s and 2s in C
Question 3: Given an array, the difference between the elements is one, find if the “key” element is present or not.
Question 4: Given an unsorted array, find the minimum difference between 2 elements.
Question 5: Given an unsorted array, find the least difference between the element pairs. Display all the pairs present.
Question 7: Given an unsorted integer array, find the smallest missing positive integer.
Question 8: Given an array, find all the repeated elements in C language
Question 10: Given an array, find 3 elements such that [a + b + c] = 0. Find all the 3 unique elements.
Question 14: Given a collection of distinct integers, return all possible permutations C++ solution
Question 15: Given a collection of numbers that might contain duplicates, return all possible unique permutations in C++
Question 16: Given an array of non-negative integers determine if you are able to reach the last index in C++
Question 17: Merge overlapping Intervals solution in C++
Question 18: Reach the end of the array with minimum jumps. Solution in C++
Question 20: Given a set of distinct integers, nums, return all possible subsets in CPP
Question 21: Given a sorted array, remove duplicate elements in-place in CPP
Question 23: Given array of integers that might contain duplicates, return all the subsets. Solution in CPP
Question 24: Given an array of non overlapping integers, insert a new interval by merging them, solution in C++
Question 25: Given a positive integer, generate pascal triangle, solution in C++
Question 26: Given a positive number “k” return the row of that index of pascals triangle, solution in C++
Question 27: Given an array and a number n, rotate the array by n steps to its right solution in C++
Question 28: Given an array, check if it has any duplicate elements, 2 solutions in CPP
Question 29: Given a sorted array, find the starting and ending index that matches the target – 2 solutions using C++
Question 31: Given an array, find the continuous sub array that has the largest sum, return the sum. 2 solutions in C++
Question 32: Given an integer array, find the maximum product made from continuous elements in that array. Solution in C++
Question 33: Given an array, find the majority element, solution in C++
Matrix Related Questions:
Question 1: Given an n x n 2D matrix rotate it by 90 degrees (clockwise) in C++ in place
Question 2: Given a matrix of m x n elements , print all elements of the matrix in spiral order in CPP
Question 4: Find path from top right to bottom left with Solution in C++
Question 5: Find path from top right to bottom left with obstacles in C++
Question 6: Minimum Cost Path in CPP
Question 7: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place in CPP
Question 8: Given a 2D Matrix and a key element, search and return if element is present or not in C++
Question 9: Given 2D matrix and a word, find if the word exists in the grid in C++
Question 10: Check if the given board is valid Sudoku or not, explanation with solution in C++
Question 11: Find minimum path from top to bottom in a triangle solution with explanation in C++
Question 12: Given a 2D board with X and O, get all the region surrounded by X, explanation in CPP
Linked List Related Questions:
Question 2: Given linked list swap Nodes in Pairs, solution in C++
Question 3: Given a linked list Remove Nth Node From End of List
Question 4: Merge two sorted linked lists and return it as a new list in C
Question 5: Merge k sorted linked lists and return it as one sorted list in C++
Question 6: Reverse Linked List iterative and recursive in C++
Question 7: Find Intersection of Two Linked Lists in c++
Question 8: Rotate linked list by k nodes in C++
Question 11: Reverse Linked List given 2 points m and n, solution in CPP
Question 13: Given a linked list, check if it has a cycle in it, solution in C++
Question 14: Given a linked list, if it has a cycle, get the node where the cycle begins else return NULL.
Question 15: Reorder list in to alternate nodes like first lowest and first highest. Solution in C++
Question 16: Given a linked list, sort the list using insertion sort. Solution with explanation
Question 17: Perform binary search on a singly linked list, solution in C++
Question 18: Perform bubble sort on singly linked list, solution in C++
Question 19: Perform below operations on Circular Singly Linked List, solution in C++
Question 20: Perform below delete operations from single linked list, solution in C++
Question 21: Perform below delete operations from single linked list, solution in C++
Question 22: Given an unsorted linked list, sort the list using merge sort, solution in C++
Strings Related Questions:
Question 1: Given a string, and number of rows, write the string in zigzag pattern.
Question 2: Given an integer value, convert it into roman number.
Question 3: Given a string find the longest Palindromic Substring with detailed explanation and solution in C++.
Question 5: Letter Combinations of a Phone Number, solution in C++
Question 6: You are given with n pairs of parentheses, generate all combinations of well-formed parentheses.
Question 8: Group Anagrams when given an array of strings in C++
Question 9: Given an absolute path for a file (linux-style), simplify it CPP
Question 10: Check if a given string is a valid number in CPP
Question 11: you are given a string having digits, convert into the string by looking at the table given below, solution in C++
Question 12: Given a string of integers, restore all valid IP addresses solution in C++
Question 13: Given a string return all the substring that is a palindrome, solution in CPP
Question 16: Given a string, reverse all the vowels in the string , solution in C++
Question 17: You are given a sentence, reverse the string word by word in C++
Question 18: Given 2 strings, check if they are isomorphic strings, solution in C++
Two Pointers Related Questions:
Question 1: Find the Container with Most Water explanation with diagram and solution in cpp language
Question 2: Rain water trapping in C++
Question 3: Find the minimum element from an array that is sorted and is rotated, solution in C++
Backtracking Related Questions:
Question 1: Letter Combinations of a Phone Number, solution in C++
Question 2: Given two integers n and k, return all possible combinations of k numbers out of 1 … n in CPP
Question 3: N-Queens in CPP
Recursion and Dynamic Programming Related Questions:
Question 1: You are given with n pairs of parentheses, generate all combinations of well-formed parentheses.
Question 2: Implement pow(x, n), which calculates x raised to the power n (x^n) in C++
Question 3: Wildcard Matching in C++
Bitwise Operations Related Questions:
Question 1: Divide two integers without using multiplication, division and mod operator
Question 2: You are given a positive number “n”, print the sequence of grey code solution in CPP
Question 3: Given a non-empty array, all the elements appears twice except for one, find that element.
Question 4: Given an array every element appears three times except for one. Find that single one. Solution in C++
Question 5: 1’s and 2’s complement of a Binary Number
Question 6: Add and subtract 2 numbers using bitwise operators. C++ Solution
Question 9: Perform below operations using Bitwise Operators
Question 10: Perform below swapping operations using Bitwise operators
Question 11: Perform multiplication operation using Bitwise operators
DFS/BFS Related Questions:
Question 2: Word Ladder explanation with solution in CPP
Question 3: Given a string return all the substring that is a palindrome, solution in CPP
Question 4: Given a 2D board with X and O, get all the region surrounded by X, explanation in CPP
Question 5: Solve Sudoku, explanation in CPP
MISC Related Questions:
Question 1: Count the number of ways a baby can reach the nth stair taking 1 or 2 steps at a time in C language.
Question 2: Implement next permutation, which rearranges numbers into the next greater permutation of numbers.
Question 3: Optimum Time to Buy and Sell Stock for maximum profit explanation with solution in C++
Question 4: Check if there is a gas stations along a circular route, solution with explanation in CPP
Question 5: Create a data structure for n elements and constant operations
Question 6: Given an expression in reverse polish notation, evaluate it and get the output in C++