Question: 3. Consider follow linked list class ListNode: def _init_(self, data): self.data-data self.next= None def traversal (head) : curNode-head while curNode is not None: print (curNode.data,

3. Consider follow linked list

class ListNode:

def _init_(self, data):

self.data-data self.next= None

def traversal (head) :

curNode-head while curNode is not None:

print (curNode.data, enda

[

a=ListNode (11)

b=ListNode (52) c=ListNode (16)

a.next =b

b.next =c

head =a

1 #Line 10

[

print (a.next.next.data)

traversal (head)

Fill in blanks Line 20-22 to add a node '43' to the in

following figure

3. Consider follow linked list class ListNode: def _init_(self, data): self.data-data self.next=

3. Consider follow linked list class ListNode: def _init__(self, data): self.data-data self.next= None def traversal (head): curNode=head while curNode is not None: print (curNode.data, end="") [ ] #Line 10 a=ListNode (11) b=ListNode (52) c=ListNode (16) a.next =b b.next =c head =a [ [ ] ] ] print (a.next.next.data) traversal (head) Fill in blanks Line 20-22 to add a node '43' to the in front of node 'll' as following figure

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!