McqMate
Q. |
Which of the following takes O(n) time in worst case in array implementation of stack? |
A. | pop |
B. | push |
C. | isempty |
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. |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet