Skip to content

Category Archives: Queue

A Priority Queue is different from a normal queue, because instead of being a “first-in-first-out”, values come out in order by priority. It is an… Read More
Prerequisite – Circular Singly Linked List We have discussed basics and how to implement circular queue using array in set 1. Circular Queue | Set… Read More
What is a Circular Queue? A Circular Queue is an extended version of a normal queue where the last element of the queue is connected… Read More
I want to share my interview experience with Paytm with all of you. Round-1 [1.5 hr] Brief introduction Discussion about project why are you using… Read More
Implement a deque Using a circular array: Deque or Double Ended Queue is a generalized version of the Queue data structure that allows insert and… Read More
Given a binary matrix of N x M, containing at least a value 1. The task is to find the distance of the nearest 1… Read More
Given a square chessboard of N x N size, the position of the Knight and the position of a target are given. We need to… 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 is present in 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