Stacks and Queues - Complexity Analysis - Case Studies

Download Q&A
Q. What is the average time complexity of searching for an element in a stack?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of finding the minimum element in a stack that supports this operation?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of reversing a queue using a stack?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(1)
Showing 1 to 3 of 3 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely