In a stack, if a user tries to remove an element from an empty stack it is called _________

untitled

Quiz
•
Computers
•
University
•
Hard
Kanishk R
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Underflow
Empty collection
Overflow
Garbage Collection
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of the postfix expression 6 3 2 4 + - *?
1
40
74
-18
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following postfix expression with single digit operands is evaluated using a stack: 8 2 3 ^ / 2 3 * + 5 1 * - Note that ^ is the exponentiation operator. The top two elements of the stack after the first * is evaluated are:
3,2
1,5
6,1
5,7
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Assume that the operators +, -, × are left associative and ^ is right associative. The order of precedence (from highest to lowest) is ^, x , +, -. The postfix expression corresponding to the infix expression a + b × c - d ^ e ^ f is
abc × + def ^ ^ -
abc × + de ^ f ^ -
ab + c × d - e ^ f ^
+ a × bc ^ ^ def
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose a stack is to be implemented with a linked list instead of an array. What would be the effect on the time complexity of the push and pop operations of the stack implemented using linked list (Assuming stack is implemented efficiently)?
O(1) for insertion and O(n) for deletion
O(1) for insertion and O(1) for deletion
O(n) for insertion and O(1) for deletion
O(n) for insertion and O(n) for deletion
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider n elements that are equally distributed in k stacks. In each stack, elements of it are arranged in ascending order (min is at the top in each of the stack and then increasing downwards). Given a queue of size n in which we have to put all n elements in increasing order. What will be the time complexity of the best known algorithm?
O(n logk)
O(nk)
O(n2)
O(k2)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If the elements "A", "B", "C" and "D" are placed in a queue and are deleted one at a time, in what order will they be removed?
ABCD
DCBA
DCAB
ABDC
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Quiz 1 - AK2 Section

Quiz
•
University
15 questions
DATA STRUCTURES QUIZ

Quiz
•
University
14 questions
Data Structure

Quiz
•
University
9 questions
DSA Day 3

Quiz
•
University
10 questions
UNIT-2 QUEUE

Quiz
•
University
12 questions
Data Structures

Quiz
•
University
15 questions
Stack??

Quiz
•
University
9 questions
Stacks/Queues

Quiz
•
University
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade