Skip to content

Category Archives: Queue

Given a binary matrix of N x M, containing at least a value 1. The task is to find the distance of nearest 1 in… Read More
Given a square chessboard of N x N size, the position of Knight and position of a target is given. We need to find out… Read More
Given an array of both positive and negative integers, the task is to compute sum of minimum and maximum elements of all sub-array of size… Read More
Given an array of digits (values are from 0 to 9), find the minimum possible sum of two numbers formed from digits of the array.… Read More
Given a Binary Tree having positive and negative nodes, the task is to find the maximum sum level in it. Examples:  Input : 4 /… Read More
I recently go interviewed for MakeMyTrip Developer position. I had 5 rounds: Round 1: 1) Reverse a Linked List – You should be able to… Read More
We are given queue data structure, the task is to implement stack using only given queue data structure.We have discussed a solution that uses two… Read More
The Queue interface present in the java.util package and extends the Collection interface is used to hold the elements about to be processed in FIFO(First… Read More
Given two Binary Trees, write a function that returns true if two trees are mirror of each other, else false. For example, the function should… Read More
1. Written Round : 1) 30 Aptitude questions(30 min). 2) 2-Coding questions(30 min). 2-a) Write an algorithm for dutch national flag problem 2-b) Write an… Read More
Round 1 (Coding round): 1) Range [L, R] is given. Need to find what is the maximum repeating digit in prime numbers between L and… Read More
Given an expression with only ‘}’ and ‘{‘. The expression may not be balanced. Find minimum number of bracket reversals to make the expression balanced.Examples: … Read More
Recently Microsoft visited our campus for recruitment and following is my interview experience. MCQ Round- 15 MCQ questions from C , C++ , java (1… Read More
Given a string consisting of opening and closing parenthesis, find the length of the longest valid parenthesis substring. Examples:  Input : ((() Output : 2… 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