recategorized by
716 views

1 Answer

0 votes
0 votes

Basic Operations of stack -:push and Pop takes constant time $\Omega \left ( 1 \right )$,But searching an element will take $O\left ( n \right )$ as in the worst case you may have to pop 'n' element to get the key if the key is present at the bottom of stack.

Note -:Searching is not basic operation of stack.

Related questions