## 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 »

- Real-time application of Data Structures
- Stack of Pair in C++ STL with Examples
- C/C++ program for calling main() in main()
- Important functions of STL Components in C++
- Maximize sum of topmost elements of S stacks by popping at most N elements
- Min difference between maximum and minimum element in all Y size subarrays
- Range Sum and Update in Array : Segment Tree using Stack
- Generate Complete Binary Tree in such a way that sum of non-leaf nodes is minimum
- Static and Dynamic data structures in Java with Examples
- Append the elements of queue in mirror-inverse order
- Program to convert Infix notation to Expression Tree
- Minimum steps required to make an array decreasing
- Check whether there exists a triplet (i, j, k) such that arr[i] < arr[k] < arr[j] for i < j < k
- Difference between Stack and Array
- Sort array such that absolute difference of adjacent elements is in increasing order
- Print all K-sum levels in a Binary Tree
- Maximum of XOR of first and second maximum of all subarrays
- Output of Java Programs | Set 55 (Java Collections Framework)
- Reverse the elements only at odd positions in the given Array
- Level order traversal in spiral form using stack and multimap
- Calculate weight of parenthesis based on the given conditions
- Find cells in Matrix that are not visited by Robot for given movements
- Find number of subarrays ending with arr[i] where arr[i] is the minimum element of that subarray
- Change the given string according to the given conditions
- Unique subsequences of length K with given sum
- Minimum operation required to make a balanced sequence
- Check if a string can be split into even length palindromic substrings
- Sum of decomposition values of all suffixes of an Array
- Stack machine in Computer Organisation
- Difference between Array, Queue and Stack

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 »

We all know about Stacks also known as Last-In-First-Out(LIFO) structures. Stack primarily has two main operation namely push and pop, where push inserts an element… Read More »

Given an array of N distinct elements where elements are between 1 and N both inclusive, check if it is stack-sortable or not. An array… Read More »

Prefix and Postfix expressions can be evaluated faster than an infix expression. This is because we don’t need to process any brackets or follow operator… Read More »

Given a linked list, print reverse of it without modifying the list. Examples: Input : 1 2 3 4 5 6 Output : 6 5… Read More »

While we use infix expressions in our day to day lives. Computers have trouble understanding this format because they need to keep in mind rules… Read More »

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 »

Given an array of N distinct element of at least size 2. A pair (a, b) in an array is defined as ‘a’ is the… Read More »

Given an expression, find and mark matched and unmatched parenthesis in it. We need to replace all balanced opening parenthesis with 0, balanced closing parenthesis… Read More »

Round 1: Place all numeric characters in string before alphabet characters . Using min swaps and O(1) space and Maintain the order of characters. Round… Read More »

Given a string with brackets. If the start index of the open bracket is given, find the index of the closing bracket. Examples: Input :… Read More »

Given two expressions in the form of strings. The task is to compare them and check if they are similar. Expressions consist of lowercase alphabets,… Read More »

Construct a binary tree from a string consisting of parenthesis and integers. The whole input represents a binary tree. It contains an integer followed by… Read More »

Given an array of n integers and q queries, print the number of next greater elements to the right of the given index element. Examples:… Read More »

Given an array, for each element find the value of nearest element to the right which is having frequency greater than as that of current… Read More »