Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

hi pls answer these questions X { .1150%-18.53 Quiz 6 https://moodle.vle.monash.

ID: 3716086 • Letter: H

Question

hi pls answer these questions

X { .1150%-18.53 Quiz 6 https://moodle.vle.monash.edu P Flag question What is the worst-case time complexity of pushing to linked Stack? def push (self, item): elf.top Node(item, self.top) Select one: 0 A, 0(1) O B. O(log N) C. O(N) 0 D. None of the above Previous page Finish attempt Copyright 2014 Monash University - These course materials are for your research and study only. Further reproduction, transmission or sale without permission is prohibited - Privacy - CRICOS Provider Number: 00008C You are logged in as Sook Yee Lim (Log out) FIT1008-S1-2018

Explanation / Answer

when you push into the stack or pop from the stack,The time complexity is O(1).

Hence for the first two questions answer will be O(1). It is the answer because you no need to disturb other elements when you push or pop the stack.

You also know that stack is Last In First Out