Question
Doubly-Linked List . complete a part of this code ( student home work) class DLNode: # modelling a node with doubly-linked def __init__(self, inValue=None, inPrev=None,
Doubly-Linked List . complete a part of this code ( student home work)
class DLNode: # modelling a node with doubly-linked def __init__(self, inValue=None, inPrev=None, inNext=None): # constructor self.value = inValue # the node data value, default None self.prevN = inPrev # the previous node, default None self.nextN = inNext # the next node, default None
class DLList: # defining a class of Doubly-Linked List def __init__(self): # GIVEN: constructor self.headN = None # the head Node self.tailN = None # the tail Node
###################### STUDNET's WORK ###################### # simple comment HERE def insertBefore(self, refValue, newV): # insert a new node, BEFORE the ref Node (value) pass # TO BE MODIFIED AND COMPLETED # simple comment HERE def insertAfter(self, refValue, newV): # insert a new node, AFTER the ref Node (value) pass # TO BE MODIFIED AND COMPLETED
# simple comment HERE def displayDLBackw(self): print(f">>> DOUBLY-Linked-List Display, Backwards: >") pass # TO BE MODIFIED AND COMPLETED
#################
Sample console display output of executing the main testing program Aonect.py === A1C, DLList program, by
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started