## Find the longest path in a matrix with given constraints

Given a n*n matrix where all numbers are distinct, find the maximum length path (starting from any cell) such that all cells along the path… Read More »

- Check if a word exists in a grid or not
- Minimum steps to reach any of the boundary edges of a matrix | Set 1
- Sum of XOR of all subarrays
- Count ways to reach a score using 1 and 2 with no consecutive 2s
- Make Binary Search Tree
- Treasure and Cities
- Number of ways to partition a string into two balanced subsequences
- Memoization using decorators in Python
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Jump Pointer Algorithm
- Minimum distance to the end of a grid from source
- Minimum steps required to convert X to Y where a binary matrix represents the possible conversions
- Minimum cost to reach a point N from 0 with two different operations allowed
- A variation of Rat in a Maze : multiple steps or jumps allowed
- Count of Numbers in Range where first digit is equal to last digit of the number
- Count of sub-sets of size n with total element sum divisible by 3
- Minimum sum falling path in a NxN grid
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Ways to place K bishops on an N×N chessboard so that no two attack
- Find sub-matrix with the given sum
- Number of Binary Strings of length N with K adjacent Set Bits
- Find the sum of first N odd Fibonacci numbers
- Minimum Operations to make value of all vertices of the tree Zero
- Number of balanced bracket expressions that can be formed from a string
- Minimum number of operations required to sum to binary string S
- Count of Numbers in a Range where digit d occurs exactly K times
- Count pairs (A, B) such that A has X and B has Y number of set bits and A+B = C
- Count the number of special permutations
- Count of Numbers in Range where the number does not contain more than K non zero digits
- Number of Paths of Weight W in a K-ary tree

Given a n*n matrix where all numbers are distinct, find the maximum length path (starting from any cell) such that all cells along the path… Read More »

Given a string consisting of opening and closing parenthesis, find length of the longest valid parenthesis substring. Examples: Input : ((() Output : 2 Explanation… Read More »

Given a distance ‘dist, count total number of ways to cover the distance with 1, 2 and 3 steps. Examples : Input: n = 3… Read More »

MakeMyTrip recently visited our campus. There were 5 rounds. Online Round ( 1 Hour ) This round consisted of 20 aptitude questions and 3 coding… Read More »

Online round: [60 mins] 1. given a number N. print in how many ways it can be represented as N = a+b+c+d , 1< =a<… Read More »

Given a number n, find count of all binary sequences of length 2n such that sum of first n bits is same as sum of… Read More »

Round -1(written) 20 Online MCQ topics are c, Data Structure and Algorithms, Networks, DBMS,OS Round 1(F2F) [1.5 hr] Introduce yourself. 1) Sort array [0,1,1,1,1,0,0,1] do… Read More »

Given a string, find length of the longest repeating subseequence such that the two subsequence don’t have same string character at same position, i.e., any… Read More »

Consider the below problems statement. There are 100 different types of caps each having a unique id from 1 to 100. Also, there are ‘n’… Read More »

Given a string consisting of only A’s and B’s. We can transform the given string to another string by toggling any character. Thus many transformations… Read More »

Recently walmart labs came to our campus for campus recruitment. Here is my interview experience: Round 1 (MCQ + Coding Questions) This round was conducted… Read More »

Given a number n, we need to count total number of n digit numbers such that the sum of even digits is 1 more than… Read More »

Given two integers ‘n’ and ‘sum’, find count of all n digit numbers with sum of digits as ‘sum’. Leading 0’s are not counted as… Read More »

Given a grid with each cell consisting of positive, negative or no points i.e, zero points. We can move across a cell only if we… Read More »

A number is non-decreasing if every digit (except the first one) is greater than or equal to previous digit. For example, 223, 4455567, 899, are… Read More »