A

Admin • 832.27K Points
Coach

Q. What is the time complexity of the program to reverse stack when linked list is used for its implementation?

  • (A) o(n)
  • (B) o(n log n)
  • (C) o(n2)
  • (D) o(log n)

Explanation by: Admin
as a linked list takes o(n) time for getting reversed thus linked list version of stack will also take the same time.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.