Skip to content

Category Archives: Dynamic Programming

MakeMyTrip recently visited our campus. Below is my interview experience:  Round 1: (Online MCQs) Section A- There were 20 Aptitude and Logical Reasoning questions which has… Read More
A triangulation of a convex polygon is formed by drawing diagonals between non-adjacent vertices (corners) such that the diagonals never intersect. The problem is to… Read More
Given the mobile numeric keypad. You can only press buttons that are up, left, right or down to the current button. You are not allowed… Read More
Given a directed and two vertices ‘u’ and ‘v’ in it, find shortest path from ‘u’ to ‘v’ with exactly k edges on the path.… Read More
Checking your coding capabilities and thinking level is their main motive. Hence the whole procedure I was involved in dealt only with coding questions. 😀There… Read More
There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs… Read More
Given a directed graph and two vertices ‘u’ and ‘v’ in it, count all possible walks from ‘u’ to ‘v’ with exactly k edges on… Read More
Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of possible decodings of the given digit sequence.  Examples:  Input:… Read More
Given a positive integer N, count all possible distinct binary strings of length N such that there are no consecutive 1’s. Examples:  Input: N =… Read More
Given a boolean expression with the following symbols.  Symbols 'T' ---> true 'F' ---> false And following operators filled between symbols  Operators & ---> boolean… Read More
Catalan numbers are defined as a mathematical sequence that consists of positive integers, which can be used to find the number of possibilities of various… Read More
Given an unsorted array, trim the array such that twice of minimum is greater than maximum in the trimmed array. Elements should be removed either… Read More
The problem is to count all the possible paths from the top left to the bottom right of a M X N matrix with the… Read More
Given a positive integer n, generate all possible unique ways to represent n as sum of positive integers.  Examples:  Input: n = 2 Output: 2… Read More
  Travelling Salesman Problem (TSP):  Given a set of cities and the distance between every pair of cities, the problem is to find the shortest… Read More