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
Question 193: Arrays: Find numbers with even number of digits
Question 194: Arrays: Find unique numbers that sum upto zero
Question 195: Arrays: Find the k’th smallest/largest element in an array
Question 196: Arrays: Check If N and Its Double Exist
Question 197: Arrays: Move all the negative number in beginning
Question 198: Arrays: Find the union and intersection of two sorted arrays
Question 199: Arrays: Given an array, rotate it one time
Question 200: Arrays: Minimize the maximum difference between the heights
Question 201: Arrays: Given an array find the duplicate number
Question 202: Arrays: Merge Two Sorted arrays without using extra space
Question 203: Arrays: Inversion Count in an Array
Question 204: Arrays: Find common element in 3 sorted arrays.
Question 205: Arrays: Rearrange the array with one positive and one negative number.
Question 206: Arrays: Check if 3 consecutive odds exist
Question 207: Arrays: Merge sorted array inplace
Question 208: Arrays: Find whether an array is subset of another array
Question 209: Arrays: Find a triplet that sum to a given value
Question 210: Arrays: Find triplet with minimum sum
Question 211: Arrays: Three way partitioning of an array around a given range
Question 212: Arrays: Minimum swaps required to bring all elements less than or equal to k together
Question 213: Arrays: Get minimum number of merge operations to make an array palindrome
Question 214: Arrays: Find the median of 2 sorted arrays of same size
Question 215: Arrays: Program to check if an Array is Palindrome or not
Question 216: Matrix: Find median in a row wise sorted matrix.
Question 217: Matrix: Find a row with maximum number of 1’s in a binary matrix
Question 218: Matrix: Get the common elements in all row of a matrix.
Question 219: Strings: Reverse a string
Question 220: Strings: Remove all consecutive duplicates from the string
Question 221: Strings: Print all the duplicates in a string
Question 222: Strings: Given a string convert into its equivalent ASCII form
Question 223: Strings: Program to check if strings are rotations of each other or not
Question 224: Strings: Second most repeated word in a sequence
Question 225: Strings: Longer Contiguous Segments of Ones than Zeros
Question 226: Strings: Given a string, print all the subsequence
Question 227: Strings: Permutations of a given string
Question 228: Strings: Divide binary string into sub strings with equal number of 0s and 1s.
Question 229: Strings: Check balanced parenthesis
Question 230: Strings: Convert a string into its mobile numeric keypad
Question 231: Strings: Get the minimum number of inversions needed to make an expression balanced
Question 232: Strings: Count the number of string in 2D character array
Question 233: Strings: Convert Roman Numerals to Decimal
Question 234: Strings: Longest Common Prefix
Question 235: Strings: Minimum number of flips to make binary string alternate
Question 236: Strings: Minimum swaps required for bracket balancing
Question 237: Strings: Find the first repeated word in a string
Question 238: Strings: Find the longest common subsequence between two strings.
Question 239: Strings: Smallest distinct window
Question 240: Strings: Recursively print all sentences that can be formed from list of word lists
Question 241: Searching and Sorting: Get the fixed point in an array
Question 242: Searching and Sorting: Maximum and minimum of an array using minimum number of comparisons
Question 243: Searching and Sorting: Find the majority element in the array
Question 244: Searching and Sorting: Search an array where adjacent differ by at most k
Question 245: Searching and Sorting: Count all distinct pairs with difference equal to k
Question 246: Searching and Sorting: Maximum sum such that no two elements are adjacent
Question 247: Searching and Sorting: Merge 2 sorted arrays
Question 248: Searching and Sorting: print all subarrays with 0 sum
Question 249: Searching and Sorting: Product of array except itself
Question 250: Searching and Sorting: Sort Integers by The Number of 1 Bits
Question 251: Searching and Sorting: Minimum number of swaps required to sort an array
Question 252: Searching and Sorting: Find the smallest and second smallest elements in an array
Question 253: Searching and Sorting: K-th Element of Two Sorted Arrays
Question 254: Searching and Sorting: Factorial Trailing Zeroes
Question 255: Searching and Sorting: Find the missing number in Arithmetic Progression
Question 256: Linked List: Reverse Linked List in groups
Question 257: Linked List: Remove duplicates from an unsorted linked list
Question 258: Linked List: Move last element to front of a given Linked List
Question 259: Linked List: Add 1 to the linked list
Question 260: Linked List: Find middle element in Linked List
Question 261: Linked List: Split circular Linked List into two halves
Question 262: Linked List: Program to Check if a Singly Linked List is Palindrome
Question 263: Linked List: Deletion from a Circular Linked List
Question 264: Linked List: Reverse a Doubly Linked List
Question 265: Linked List: Find pairs with a given sum in a DLL.
Question 266: Linked List: Count triplets in a sorted DLL whose sum is equal to given value “k”.
Question 267: Linked List: Sort a “k”sorted Doubly Linked list
Question 268: Linked List: Rotate Doubly linked list by N nodes
Question 269: Linked List: Rotate a Doubly Linked list in group of Given Size
Question 270: Linked List: Flatten a Linked List
Question 271: Linked List: Multiply two numbers represented by Linked Lists
Question 272: Linked List: Delete nodes which have a greater value on right side using recursion
Question 273: Linked List: Segregate even and odd nodes in a Linked List
Question 274: Linked List: Odd Even Linked List
Question 275: Binary Trees: Diagonal Traversal of a Binary tree
Question 276: Binary Trees: Convert Binary tree into Sum tree
Question 277: Binary Trees: Construct Binary Tree from preorder and inorder traversal
Question 278: Binary Trees: Minimum swap required to convert binary tree to binary search tree
Question 279: Binary Trees: Convert Binary Tree to DLL
Question 280: Binary Trees: Find Duplicate Subtrees
Question 281: Binary Trees: Find largest subtree sum in a tree
Question 282: Binary Search Trees: Find a value in a BST
Question 283: Binary Search Trees: Deletion of a node in a BST
Question 284: Binary Search Trees: Find min and max value in a BST
Question 285: Binary Search Trees: Find the Inorder predecessor and successor for a given key in BST
Question 286: Binary Search Trees: A program to check if a binary tree is BST or not
Question 287: Binary Search Trees: Convert a BST into greater sum tree
Question 288: Binary Search Trees: LCA in a BST
Question 289: Binary Search Trees: Construct BST from preorder traversal
Question 290: Binary Search Trees: Convert Binary Tree into Binary Search Tree.
Question 291: Binary Search Trees: Convert a normal BST into a Balanced BST
Question 292: Binary Search Trees: Merge Two balanced BST
Question 293: Binary Search Trees: Kth Largest Element in a BST
Question 294: Binary Search Trees: Kth smallest Element in a BST
Question 295: Binary Search Trees: Return the sum of given range in BST.
Question 296: Binary Search Trees: Get the Shortest distance between two nodes in BST
Question 297: Binary Search Trees: Count the number of BST nodes that lie in a given range.
Question 298: Binary Search Trees: Convert sorted DLL to Balanced BST
Question 299: Binary Search Trees: Find triplet sum in BST
Question 300: Binary Search Trees: Check if the pre-order is a valid BST
Question 301: Binary Search Trees: Check if the BST has a dead end
Question 302: Binary Search Trees: Correct a BST where 2 nodes are swapped
Question 303: Binary Search Trees: Flatten BST to sorted list
Question 304: Greedy: Remove duplicates from a string
Question 305: Greedy: Add elements in an array so the sum is equal to the given range
Question 306: Greedy: Remove k digits from an number to make it a smallest integer.
Question 307: Greedy: Get the minimum platforms needed to avoid delay in the train arrival.
Question 308: Greedy: Check if the string is a substring of another string
Question 309: Greedy: Remove overlapping intervals.
Question 310: Greedy: Plant n flowers in flower bed
Question 311: Greedy: Maximum meetings in one room
Question 312: Greedy: Distribute Candy
Question 313: Greedy: Shuffle array so that one array element is greater than other array element
Question 314: Greedy: Schedule task efficiently
Question 315: Greedy: Maximum sum of absolute difference of an array
Question 316: Greedy: Maximum sum of absolute difference of an array
Question 317: Greedy: Juice change
Question 318: Greedy: Given a string, split into balanced strings.
Question 319: Greedy: Perform operations on a broker calculator
Question 320: Greedy: Add minimum to make parentheses valid.
Question 321: Greedy: Remove covered intervals.
Question 322: Greedy: Reduce the array size to the half
Question 323: Greedy: String break problem
Question 324: Greedy: Connect ropes with minimum cost.
Question 325: Greedy: Find maximum sum possible equal sum of three stacks
Question 326: Backtracking: Partition string into its palindrome
Question 327: Backtracking: You are given an array with repeated elements and a key element, find all unique combination to the key
Question 328: Backtracking: Get the k combination from an array of 1 to n
Question 329: Backtracking: Find combination sum of k numbers that sum up to n
Question 330: Backtracking: Letter case permutation
Question 331: Backtracking: Return the number of queens possible in a chessboard
Question 332: Backtracking: Get the sequential digits from the given range
Question 333: Backtracking: Partition to K Equal Sum Subsets
Question 334: Matrix: Find pair with maximum sum in the matrix.
Question 335: Matrix: Kth smallest element in a sorted matrix
Question 336: Strings: Minimum Number of Swaps to Make the Binary String Alternating
Question 337: Strings: Longest Substring Of All Vowels in Order
Question 338: Strings: Word Break Problem
Question 339: Strings: Check if it is possible to re-arrange characters in a string, such a way that no two adjacent are same
Question 340: Strings: Check if Word Equals Summation of Two Words
Question 341: Strings: Minimum Window Substring
Question 342: Strings: Remove all consecutive duplicates from the string
Question 343: Strings: Longest Prefix Suffix
Question 344: Strings: Find minimum operations required to transform a string into another string
Question 345: Strings: Number of Different Integers in a String
Question 346: Binary Trees: Check if a given graph is tree or not
Question 347: Binary Trees: Maximum Sum of nodes in Binary tree such that no two are adjacent
Question 348: Binary Trees: Kth Ancestor of a Tree Node
Question 349: Binary Trees: Find Duplicate Subtrees
Question 350: Backtracking: Get maximum sum in a matrix
Question 351:
Question 352:
Question 353:
Question 354:
Question 355:
Question 356:
Question 357:
Question 358:
Question 360: