Which of the following takes O(n) time in worst case in array implementation of stack?
|D.||pop, push and isempty takes constant time|
|Answer» D. pop, push and isempty takes constant time|
|Explanation: functions pop, push and isempty all are implemented in constant time in worst case.|
Login to Continue
It will take less than 2 minutes