## Merging and Sorting Two Unsorted Stacks

Given 2 input stacks with elements in an unsorted manner. Problem is to merge them into a new final stack, such that the elements become… Read More »

- Next Smaller Element
- Next greater element in same order as input
- Nutanix Interview Experience (On-Campus)
- Arithmetic Expression Evalution
- Rat in a Maze | Backtracking using Stack
- Computer Organization | Stack based CPU Organization
- Check for balanced parenthesis without using stack
- Microsoft Interview experience | Set 178 (On-Campus Internship for IDC)
- Preorder from Inorder and Postorder traversals
- Find maximum in a stack in O(1) time and O(1) extra space
- Infix to Prefix conversion using two stacks
- Sum of minimum elements of all subarrays
- Clone a stack without extra space
- Solve the Logical Expression given by string
- Implement a stack using singly linked list
- Level order traversal in spiral form | Using one stack and one queue
- Reduce the string by removing K consecutive identical characters
- Find the product of last N nodes of the given Linked List
- Infix to Postfix using different Precedence Values for In-Stack and Out-Stack
- Water drop problem
- Check if the elements of stack are pairwise sorted
- Previous greater element
- Check if Queue Elements are pairwise consecutive
- Construct a BST from given postorder traversal using Stack
- Sudo Placement[1.3] | Playing with Stacks
- LIFO (Last-In-First-Out) approach in Programming
- Design a stack to retrieve original elements and return the minimum element in O(1) time and O(1) space
- Check if concatenation of two strings is balanced or not
- Check if the given push and pop sequences of Stack is valid or not
- Bank Of America (BA Continuum India Pvt. Ltd.) Campus Recruitment

Given 2 input stacks with elements in an unsorted manner. Problem is to merge them into a new final stack, such that the elements become… Read More »

Given a bracket sequence or in other words a string S of length n, consisting of characters ‘(‘ and ‘)’. Find length of the maximum… Read More »

Given an array a[1..N]. For each element at position i (1 <= i <= N). Where L(i) is defined as closest index j such that… Read More »

Given a Queue consisting of first n natural numbers (in random order). The task is to check whether the given Queue elements can be arranged… Read More »

Given an array of elements, task is to sort these elements using stack. Prerequisites : Stacks Examples : Input : 8 5 7 1 9… Read More »

Given a binary tree, print the level order traversal in such a way that first two levels are printed from left to right, next two… Read More »

Given a string that contains only the following => ‘{‘, ‘}’, ‘(‘, ‘)’, ‘[’, ‘]’. At some places there is ‘X’ in place of any… Read More »

Given an array arr[] and a number k. The task is to delete k elements which are smaller than next element (i.e., we delete arr[i]… Read More »

Given a stack with push(), pop(), empty() operations, delete middle of it without using any additional data structure. Input : Stack[] = [1, 2, 3,… Read More »

Given an expression exp of length n consisting of some brackets. The task is to print the bracket numbers when the expression is being parsed.… Read More »

Telephonic Round-1 A number of bad URLs are given (number could be huge-millions of them). Now user enters a URL, you need to identify whether… Read More »

Infix : An expression is called the Infix expression if the operator appears in between the operands in the expression. Simply of the form (operand1… Read More »

Prefix : An expression is called the prefix expression if the operator appears in the expression before the operands. Simply of the form (operator operand1… Read More »

Postfix: An expression is called the postfix expression if the operator appears in the expression after the operands. Simply of the form (operand1 operand2 operator).… Read More »