Skip to content

Tag Archives: Data Structures-Stack

1. Subroutine:A set of instructions that are used repeatedly in a program can be referred to as Subroutine. Only one copy of this Instruction is… 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 method… Read More
FIFO is an abbreviation for first in, first out. It is a method for handling data structures where the first element is processed first and… 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
Given a binary tree, flatten it into a linked list. After flattening, the left of each node should point to NULL and right should contain… Read More
Given an array of elements, the task is to sort these elements using a stack. Prerequisites: Stacks Examples:   Input : 8 5 7 1 9… Read More
A single array A[1..MAXSIZE] is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables top1 and top2 (topl<… Read More
Let S be a stack of size n >= 1. Starting with the empty stack, suppose we push the first n natural numbers in sequence,… Read More
The following postfix expression with single digit operands is evaluated using a stack: 8 2 3 ^ / 2 3 * + 5 1 *… Read More
Following is an incorrect pseudocode for the algorithm which is supposed to determine whether a sequence of parentheses is balanced: declare a character stack  while… Read More
Consider the following pseudocode that uses a stack declare a stack of characters while ( there are more characters in the word to read )… Read More
Which of the following is true about linked list implementation of stack? (A) In push operation, if new nodes are inserted at the beginning of… Read More
Which one of the following is an application of Stack Data Structure? (A) Managing function calls (B) The stock span problem (C) Arithmetic expression evaluation… Read More
Following is C like pseudo code of a function that takes a number as an argument, and uses a stack S to do processing. void… Read More

Start Your Coding Journey Now!