logo

Crowdly

Complete the python method that implements the push method for a Linked Stack ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Complete the python method that implements the push method for a Linked Stack class. [4 marks]

Perfect python syntax is not required.

Provide one advantage/disadvantage of a Linked Stack over an Array-Based Stack. [1 mark]

class Node:

    def __init__(self, item):

        self.item = item

        self.link = None

class LinkedStack(Stack):

    def __init__(self):

        self.top = None

        self.length = 0

    

    def push(self, item):

        pass

More questions like this

Want instant access to all verified answers on learning.monash.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!