Question: PYTHON 3 PLEASE FOLLOW INSTRUCTIONS COMPLETE CODE Problem : Complete the function joinLinkedLists() to take in two nodes that represent the beginning of two Linked
PYTHON 3 PLEASE FOLLOW INSTRUCTIONS
COMPLETE CODE
Problem : Complete the function joinLinkedLists() to take in two nodes that represent the beginning of two Linked Lists, n1 and n2, and join these Linked Lists such that n2 is attached to the end of n1.
Code : class Node: def __init__(self, value): self.value = value self.next = None def joinLinkedLists(n1, n2): # to complete
Example of output:
n1: 100-? 85-? 75-) 65 n2: 23-? 22 ?? 12 ?? 10 joinLinkedLists (n1, n2) # returns 100-) 85-) 75-) 65-) 23-) 22-) 12-) 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
