In this page I have listed all the coding questions that have been solved in this website.

Question 3: Count the number of ways a baby can reach the nth stair taking 1 or 2 steps at a time in C language.

Question 4: Sort an array of 0s, 1s and 2s in C

Question 5: Given an array, the difference between the elements is one, find if the “key” element is present or not.

Question 6: Given an unsorted array, find the minimum difference between 2 elements.

Question 7: Given an unsorted array, find the least difference between the element pairs. Display all the pairs present.

Question 9: Given an unsorted integer array, find the smallest missing positive integer.

Question 10: Given an array, find all the repeated elements in C language

Question 11: Given an integer value, convert it into roman number.

Question 12: Given a string, and number of rows, write the string in zigzag pattern.

Question 13: Given a string find the longest Palindromic Substring with detailed explanation and solution in C++.

Question 14: Given an input string (s) and a pattern (p), implement regular expression matching with support for ‘.’ and ‘*’.

Question 15: Find the Container with Most Water explanation with diagram and solution in cpp language

Question 17: Given an array, find 3 elements such that [a + b + c] = 0. Find all the 3 unique elements.

Question 20: Given a linked list Remove Nth Node From End of List

Question 21: Letter Combinations of a Phone Number, solution in C++

Question 22: You are given with n pairs of parentheses, generate all combinations of well-formed parentheses.

Question 23: Merge two sorted linked lists and return it as a new list in C

Question 24: Given linked list swap Nodes in Pairs, solution in C++

Question 25: Divide two integers without using multiplication, division and mod operator

Question 26: Implement next permutation, which rearranges numbers into the next greater permutation of numbers.

Question 28: Merge k sorted linked lists and return it as one sorted list in C++

Question 30: Given a collection of distinct integers, return all possible permutations C++ solution

Question 32: Given a collection of numbers that might contain duplicates, return all possible unique permutations in C++

Question 33: Given an n x n 2D matrix rotate it by 90 degrees (clockwise) in C++ in place

Question 34: Group Anagrams when given an array of strings in C++

Question 35: Rain water trapping in C++

Question 36: Implement pow(x, n), which calculates x raised to the power n (x^n) in C++

Question 37: Given a matrix of m x n elements , print all elements of the matrix in spiral order in CPP

Question 38: Given an array of non-negative integers determine if you are able to reach the last index in C++

Question 39: Merge overlapping Intervals solution in C++

Question 40: Reverse Linked List iterative and recursive in C++

Question 41: Given a positive integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order in C++

Question 42: Wildcard Matching in C++

Question 43: Find Intersection of Two Linked Lists in c++

Question 44: Rotate linked list by k nodes in C++

Question 45: Find path from top right to bottom left with Solution in C++

Question 46: Find path from top right to bottom left with obstacles in C++

Question 47: Minimum Cost Path in CPP

Question 48: Given an absolute path for a file (linux-style), simplify it CPP

Question 49: Reach the end of the array with minimum jumps. Solution in C++

Question 50: 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 51: Given a 2D Matrix and a key element, search and return if element is present or not in C++

Question 53: Given two integers n and k, return all possible combinations of k numbers out of 1 … n in CPP

Question 54: Given a set of distinct integers, nums, return all possible subsets in CPP

Question 55: Given 2D matrix and a word, find if the word exists in the grid in C++

Question 56: N-Queens in CPP

Question 57: Given a sorted array, remove duplicate elements in-place in CPP

Question 61: You are given a positive number “n”, print the sequence of grey code solution in CPP

Question 62: Given array of integers that might contain duplicates, return all the subsets. Solution in CPP

Question 63: Check if a given string is a valid number in CPP

Question 64: you are given a string having digits, convert into the string by looking at the table given below, solution in C++

Question 65: Reverse Linked List given 2 points m and n, solution in CPP

Question 66: Given a string of integers, restore all valid IP addresses solution in C++

Question 67: Given an array of non overlapping integers, insert a new interval by merging them, solution in C++

Question 68: Given a positive integer, generate pascal triangle, solution in C++

Question 69: Given a positive number “k” return the row of that index of pascals triangle, solution in C++

Question 70: Check if the given board is valid Sudoku or not, explanation with solution in C++

Question 71: Find minimum path from top to bottom in a triangle solution with explanation in C++

Question 72: Optimum Time to Buy and Sell Stock for maximum profit explanation with solution in C++

Question 73: Word Ladder explanation with solution in CPP

Question 74: Given a non-empty array, all the elements appears twice except for one, find that element.

Question 75: Given a string return all the substring that is a palindrome, solution in CPP

Question 76: Given a 2D board with X and O, get all the region surrounded by X, explanation in CPP

Question 77: Check if there is a gas stations along a circular route, solution with explanation in CPP

Question 78: Solve Sudoku, explanation in CPP

Question 79: Given an array every element appears three times except for one. Find that single one. Solution in C++

Question 82: Given a linked list, check if it has a cycle in it, solution in C++

Question 83: Given a linked list, if it has a cycle, get the node where the cycle begins else return NULL.

Question 85: Reorder list in to alternate nodes like first lowest and first highest. Solution in C++

Question 86: Given a linked list, sort the list using insertion sort. Solution with explanation

Question 87: Create a data structure for n elements and constant operations

Question 88: Given an array and a number n, rotate the array by n steps to its right solution in C++

Question 89: Given a string, reverse all the vowels in the string , solution in C++

Question 90: Given an array, check if it has any duplicate elements, 2 solutions in CPP

Question 91: Given a sorted array, find the starting and ending index that matches the target – 2 solutions using C++

Question 93: Given an array, find the continuous sub array that has the largest sum, return the sum. 2 solutions in C++

Question 94: 1’s and 2’s complement of a Binary Number

Question 95: Add and subtract 2 numbers using bitwise operators. C++ Solution

Question 96: Calculate the square of a number and also check if that number is even or odd using bitwise operator.

Question 99: Perform below operations using Bitwise Operators

Question 100: Perform below swapping operations using Bitwise operators

Question 101: Perform multiplication operation using Bitwise operators

Question 102: Perform binary search on a singly linked list, solution in C++

Question 103: Perform bubble sort on singly linked list, solution in C++

Question 104: Perform below operations on Circular Singly Linked List, solution in C++

Question 105: Perform below delete operations from single linked list, solution in C++

Question 106: Perform below delete operations from single linked list, solution in C++

Question 107: Given an unsorted linked list, sort the list using merge sort, solution in C++

Question 108: Given an expression in reverse polish notation, evaluate it and get the output in C++

Question 109: You are given a sentence, reverse the string word by word in C++

Question 110: Given an integer array, find the maximum product made from continuous elements in that array. Solution in C++

Question 111: Find the minimum element from an array that is sorted and is rotated, solution in C++

Question 112: Given an array, find the majority element, solution in C++

Question 113: Given 2 strings, check if they are isomorphic strings, solution in C++

Question 115: Dynamic Programming: Longest Increasing Subsequence

Question 116: Dynamic Programming: Longest Bitonic Subsequence

Question 117: Dynamic Programming: Get Max Coin In Game problem.

Question 118: Dynamic Programming: Rod Cutting Problem

Question 119: Dynamic Programming: Box Stacking Problem

Question 120: Dynamic Programming: Building Bridges

Question 121: Dynamic Programming: Egg Dropping Problem

Question 122: Dynamic Programming: Min Edit Distance

Question 123: Bottom view of binary Tree

Question 124: Boundary Traversal of Binary Tree

Question 125: Top view of a binary tree

Question 126: Left view and right view of a Binary Tree

Question 127: Level Order Traversal

Question 128: Vertical Order Traversal

Question 129: Height or Max depth of a BTree

Question 130: Spiral order or Zigzag traversal of a Binary Tree

Question 131: Diameter of a Binary Tree

Question 132: Lowest Common ancestor of a Binary Tree.

Question 133: Check if 2 nodes are mirror of each other

Question 134: Check if two binary tree are identical

Question 135: Check if binary tree is a sum tree

Question 136: Add all the node values in a Binary Tree or Sum of a Binary tree

Question 137: Print the number of leaf nodes in a binary tree

Question 138: Print all the paths from root node to leaf node

Question 139: Print the nodes at k distance from the root of a binary tree

Question 140: Reverse Bits

Question 141: Count the number of set bits

Question 142: Power of 2

Question 143: Missing Number

Question 144: Counting set bits in a number

Question 145: Hamming Distance

Question 146: Bitwise and of number range

Question 147: Binary search on an array that is in descending order

Question 148: Order-Agnostic Binary Search

Question 149: Find the first and last occurrence of an element

Question 150: Find the number of times a Sorted array is Rotated

Question 151: Searching in a Nearly Sorted Array

Question 152: Find Floor of an element in a Sorted Array

Question 153: Find Ceil of an element in a Sorted Array

Question 154: Find position of an element in an Infinite Sorted Array

Question 155: Find the index of first 1 in an infinite sorted array of 0s and 1s

Question 156: Peak Element

Question 157: Find maximum element in Bitonic Array

Question 158: Search An Element in Bitonic Array

Question 159: Get the rotation count in sorted rotated array

Question 160: Count the number of 1’s in an array sorted in decreasing order.

Question 161: Binary Tree: Get difference between values at Even and Odd level in a binary tree

Question 162: Binary Tree: Get Number of Nodes in a Binary Tree

Question 163: Binary Tree: Display nodes at given level in Binary Tree

Question 164: Binary Tree: Display Reverse Level Order Traversal by using queue

Question 165: Binary Tree: Perform PreOrder traversal on a Binary Tree by without Recursion

Question 166: Binary Tree: Perform InOrder traversal on a Binary Tree by without Recursion

Question 167: Binary Tree: Perform PostOrder traversal on a Binary Tree by without Recursion

Question 168: Binary Tree: Convert a binary tree to its Mirror Tree

Question 169: Binary Tree: Delete a binary tree

Question 170: Binary Tree: Get Level of a Given Node

Question 171: Binary Tree: Get Sum of elements Level wise in a Binary Tree

Question 172: Binary Tree: Get Maximum width of Binary Tree

Question 173: Binary Tree: Display elements between any two given level

Question 174: Binary Tree: Check if binary tree is a height balanced tree?

Question 175: Binary Tree: Check if all Leaf Nodes are at same level in Binary tree

Question 176: Binary Tree: Find Parent of a given node value in Binary Tree

Question 177: Binary Tree: Check if given Binary Tree is BST

Question 178: Binary Tree: Find Sibling node of a given node value in Binary Tree

Question 179: Binary Tree: Check if given two nodes are siblings to each other in Binary Tree

Question 180: Binary Tree: Get Sum of all nodes formed from Root to Leaf Path

Question 181: Binary Tree: Get Average of all nodes in Binary Tree

Question 182: Binary Tree: Get Sum of all Leaf Nodes in Binary Tree

Question 183: Binary Tree: Find Maximum or Minimum in Binary Tree

Question 184: Binary Tree: Check if Binary Tree is Foldable Tree

Question 185: Binary Tree: Check if two Binary Trees are Isomorphic

Question 186: Binary Tree: Get Vertical Sum of Binary Tree

Question 187: Binary Tree: Get deepest Left Leaf Node in Binary Tree

Question 188: Binary Tree: Get depth of Odd level which contains Leaf node in Binary Tree

Question 189: Binary Tree: Display all the leaf nodes from left to right and right to left in a tree

Question 190: Binary Tree: Get count Non-Leaf nodes in a Binary Tree

Question 191: Binary Tree: Get the count full nodes in a Binary

Question 192: Binary Tree: Check if Two Trees are Mirror Structure to each other