# Category Archives: Queue (adsbygoogle = window.adsbygoogle || []).push({});

## Implement Stack and Queue using Deque

Deque also known as double eneded queue, as name suggests is a special kind of queue in which insertions and deletions can be done at… Read More »

## ZigZag Tree Traversal

Write a function to print ZigZag order traversal of a binary tree. For the below binary tree the zigzag order traversal will be 1 3… Read More »

## Implementation of Deque using doubly linked list

Deque or Double Ended Queue is a generalized version of Queue data structure that allows insert and delete at both ends. In previous post Implementation… Read More »

## Amazon Interview Experience | Set 414 (For SDET-1)

I applied through an employee referral for SDET-1 position. I was interviewed at Amazon Chennai(SP Infocity).I faced 5 face to face rounds. On October 11th,… Read More »

## Interleave the first half of the queue with second half

Given a queue of integers of even length, rearrange the elements by interleaving the first half of the queue with the second half of the… Read More »

## Amazon Interview Experience | Set 389 (On -Campus for Full Time)

Online Coding Round: Time: 1.5 hr Questions Format: 20 MCQs + 2 Coding Questions MCQs were based on Data Structures, Operating systems etc. Coding Questions:… Read More »

## Reversing a Queue

Give an algorithm for reversing a queue Q. Only following standard operations are allowed on queue. enqueue(x) : Add an item x to rear of… Read More »

## Reversing the first K elements of a Queue

Given an integer k and a queue of integers, we need to reverse the order of the first k elements of the queue, leaving the… Read More »

## Check mirror in n-ary tree

Given two n-ary trees, the task is to check if they are mirror of each other or not. Print “Yes” if they are mirror of… Read More »

## Check if all levels of two trees are anagrams or not

Given two binary trees, we have to check if each of their levels are anagrams of each other or not. Example: Tree 1: Level 0… Read More »

## Adobe Interview Experience | Set 48 (On-Campus)

Coding Round: A variation of Knapsack Easy string manipulation problem A brute-force based string matching problem Technical Round 1: Finding the length of a Linked-List… Read More »

## Stack Permutations (Check if an array is stack permutation of other)

A stack permutation is a permutation of objects in the given input queue which is done by transferring elements from input queue to the output… Read More »

## Averages of Levels in Binary Tree

Given a non-empty binary tree, print the average value of the nodes on each level. Examples: Input : 4 / \ 2 9 / \… Read More »

## Queue based approach for first non-repeating character in a stream

Given a stream of characters and we have to find first non repeating character each time a character is inserted to the stream. Examples: Input… Read More »

## Hike Interview Experience | Set 5

Round I 1.Implement expiry cache system : every page in cache have id and expiry time (TTL of few seconds). After page expires it behaves… Read More »