Skip to content

Category Archives: Queue

A Queue is a linear structure that follows a particular order in which the operations are performed. The order is First In First Out (FIFO).… Read More
Given a complete binary tree with N levels numbered [0, (N – 1 )] from root to the lowest level in decreasing order and having… Read More
Web Crawler is a bot that downloads the content from the internet and indexes it. The main purpose of this bot is to learn about… Read More
Given a queue Q containing N strings, the task is to restructure the queue to double its size such that the second half represents the… Read More
Problem: Design a Data Structure a SpecialQueue which supports following operations enque, deque, getMin() or getMax() where getMin() operation takes O(1) time.Example:   Let the data… Read More
Given an integer array A[] of length N and an integer K. The task is to find K distinct integral points that are not present… Read More
Given a matrix of size N x M consisting of integers 1, 2, 3 and 4. Each value represents the possible movement from that cell:  1… Read More
Given a number N, the task is to find the Nth number which has an absolute difference of 1 between every pair of its adjacent… Read More
Data structure is a way of storing and organising data efficiently such that the required operations on them can be performed efficiently with respect to… Read More
Given N cities that are connected using N-1 roads. Between Cities [i, i+1], there exists an edge for all i from 1 to N-1.The task… Read More
Given a number K, the task is to create the Diamond-like structure of Tree which follows these two conditions:   First K levels of the tree… Read More
Given a Binary Tree, the task is to print all the Exponential Levels in the given Binary Tree.  An Exponential Level is a level whose… Read More
Given a Binary Tree and an integer K where the tree has positive and negative nodes, the task is to print the elements of the… Read More
Given a Complete Binary Tree, the task is to print the elements in the Clockwise traversal order.Clockwise Traversal of a tree is defined as:   For… Read More
Given a natural number N, the task is to print the Nth Stepping or Autobiographical number.  A number is called stepping number if all adjacent… Read More

Start Your Coding Journey Now!