In a stack implementation that uses one or more queues, fun(int x) is the push…
PYQ Capgemini Hiring Assessment 2024
In a stack implementation that uses one or more queues, fun(int x) is the push operation shown below:
public void fun(int x)
{
q1.offer(x);
}Which implementation strategy does this method represent?
- A.
A push operation in which push is the costlier operation
- B.
A push operation in which pop is the costlier operation
- C.
A pop operation in which push is the costlier operation
- D.
A pop operation in which pop is the costlier operation
Attempted by 150 students.
Sign up free to check your answer
Sign up freeLoading lesson…

