What is the time complexity of a push operation in a stack, when implemented…

PYQ CoCubes 2023

What is the time complexity of a push operation in a stack, when implemented using an array?

  1. A.

    O(1)

  2. B.

    O(n)

  3. C.

    O(n log n)

  4. D.

    O(n^2)

Attempted by 980 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…