IniziaInizia gratis

Implementing a linked list

In the video, you learned how to create singly linked lists by implementing the Node() class and the LinkedList() class.

In this exercise, you will practice implementing both of these classes. In the first step, we will implement the Node() class, and in the second step the LinkedList() class. Are you ready?

Questo esercizio fa parte del corso

Data Structures and Algorithms in Python

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

class Node:
  def __init__(self, data):
    # Store the value for the node
    self.value = ____
Modifica ed esegui il codice