Question: Question 1 : 30 points The following source code is an incomplete implementation of a linked list. We'll use this implemen- tation to answer some

 Question 1 : 30 points The following source code is an

Question 1 : 30 points The following source code is an incomplete implementation of a linked list. We'll use this implemen- tation to answer some questions. Make your best guess about what the missing function definitions do. CON OF class Node: def __init__(self, val, next = None): self.--val = val self.--next = next def get Next (self): return self.--next def set Next (self ,n): self .--next = n def get Val(self): return self.--val def set Val (self,v: self.--val = v SEE 14 # insert new value at head of list 15 def makeNode(val, current Head): # TODO # return length of list def length (my List): # TODO # prints the list def toString (my List): p = my List res = while p != None: res += str (p.get Val() if p.getNext() != None: rest="" p = p.getNext return res 33 # insert value at end of list def insert Tail (val, myList): # TODO 37 # if node in list, returns node 38 def find (target, haystack): # TODO # deletes node, returns new head of list after node deleted def delete (pointer, my List): # TODO

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!