1 votes 1 votes Consider a stack is implemented using an array. What is the worst case time complexity of push operation? (A) O(N) (B) O(log N) (C) O(N log N) (D) O(1) srestha asked Aug 4, 2016 srestha 487 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply papesh commented Aug 4, 2016 reply Follow Share I think O(1) if we store the address of lastly pushed element... 0 votes 0 votes srestha commented Aug 4, 2016 reply Follow Share plz elaborate. We r pushing in array rt? 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes When we perform push operation on a Stack implemented as an array, we just need to insert the new element on the top of the Stack. This operation can be performed in O(1) time. Hence, answer is (D). pranjalgennext answered Aug 4, 2016 pranjalgennext comment Share Follow See 1 comment See all 1 1 comment reply srestha commented Aug 4, 2016 reply Follow Share we are not pushing in stack 1 votes 1 votes Please log in or register to add a comment.