Question: class Student(object): ##__init__() functions as the class constructor def __init__(self, name=None, prev=None, nxt=None): self.name = name self.prev = prev self.next = nxt Using the above
class Student(object):
##"__init__() functions as the class constructor"
def __init__(self, name=None, prev=None, nxt=None):
self.name = name
self.prev = prev
self.next = nxt
Using the above class, describe how you would create a queue, a stack and a circular doubly linked list. The class represents a node in a linked list. That means you have to use a linked list as the form of your structure. You can use a narrative description, diagrams or pseudo code to describe how you would use the linked list node(s) in these data structures. In essence how would you use a linked list structure to perform the functions of a queue, a stack and a circular doubly linked list. Provide all details from each data structure. Describe how each object from the class would be used. Feel free to add, remove and change the objects in the class to create the proper objects.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
