Vidyalelo
Data Structure · Q143

Introduction to Data Structures

Programming · Data Structure · question 143

Q143

What is the functionality of the following piece of code? public void fun(int x) q1.offer(x);

A.
Perform push() with push as the costlier operation
B.
Perform push() with pop as the costlier operation
Answer
C.
Perform pop() with push as the costlier operation
D.
Perform pop() with pop as the costlier operation

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board