Write a function to initialize a linked list


Topic: Write a function to initialize a linked list

Solution

class Cell:
    def __init__(self, val):
        self.val = val
        self.next = None
class LinkedList:
    def __init__(self):
        self.head = None



List all Python Programs