## Reduce the string by removing K consecutive identical characters

Given a string ‘str’ and an integer ‘k’, the task is to reduce the string by applying the following operation: Choose a group of ‘k’… Read More »

- Introduction to Data Structures | 10 most commonly used Data Structures
- InfyTQ 2019 : Find the position from where the parenthesis is not balanced
- Check if the two given stacks are same
- Design a stack which can give maximum frequency element
- Implementing Forward Iterator in BST
- Reverse the Sentence using Stack
- Analyzing BufferOverflow with GDB
- Python | Stack using Doubly Linked List
- Find all unique pairs of maximum and second maximum elements over all sub-arrays in O(NlogN)
- Triplet with a given sum in BST | Set 2
- Nodes from given two BSTs with sum equal to X
- Convert ternary expression to Binary Tree using Stack
- Stack in Python
- Find the winner of the Game to Win by erasing any two consecutive similar alphabets

Given a string ‘str’ and an integer ‘k’, the task is to reduce the string by applying the following operation: Choose a group of ‘k’… Read More »

Given postorder traversal of a binary search tree, construct the BST. For example, 1. If the given traversal is {1, 7, 5, 50, 40, 10},… Read More »

Given a linked list and a number N. Find the product of last n nodes of the linked list. Constraints : 0 <= N <=… Read More »

Prerequisite: Stack, Hashing Given a stack of N numbers and an array of numbers. Count the numbers of pop operations required to get each element… Read More »

Given a stack of integers. The task is to design a special stack such that maximum element can be found in O(1) time and O(1)… Read More »

Given a stack of integers, write a function pairWiseSorted() that checks whether numbers in the stack are pairwise sorted or not. The pairs must be… Read More »

Given a Queue of integers. The task is to check if consecutive elements in the queue are pairwise consecutive. Examples: Input : 1 2 5… Read More »

Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element for an element x is the first greater element… Read More »

Prerequisites – Recursion, Backtracking and Stack Data Structure. A Maze is given as N*M binary matrix of blocks and there is a rat initially at… Read More »

Prerequisites – FIFO (First-In-First-Out) approach in Programming, FIFO vs LIFO approach in Programming LIFO is an abbreviation for last in, first out. It is a… Read More »

Given Inorder and Postorder traversals of a binary tree, print Preorder traversal. Example: Input: Postorder traversal post[] = {4, 5, 2, 6, 3, 1} Inorder… Read More »

Approved Offer. Bank Of America has visited our college for on campus recruitment . The recruitment consisted of 4 Rounds in total. The recruitment was… Read More »

Given an array, print the Next Smaller Element (NSE) for every element. The Smaller smaller Element for an element x is the first smaller element… Read More »

The stack organization is very effective in evaluating arithmetic expressions. Expressions are usually represented in what is known as Infix notation, in which each operator… Read More »

The computers which use Stack-based CPU Organization are based on a data structure called stack. The stack is a list of data words. It uses… Read More »