实现链表
在视频中,您学习了如何通过实现 Node() 类和 LinkedList() 类来创建单向链表。
在本练习中,您将练习实现这两个类。第一步,我们实现 Node() 类;第二步,实现 LinkedList() 类。准备好了吗?
本练习是课程的一部分
Python 中的数据结构与算法
交互式实操练习
通过完成这段示例代码来试试这个练习。
class Node:
def __init__(self, data):
# Store the value for the node
self.value = ____