✅ 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
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!