Skip to content
English

Nodes joined by pointers

  • A linked list is a chain of small structs called nodes, scattered around the heap.
  • Each node holds a value and a pointer to the next node. Follow the pointers to walk the list.
  • Unlike an array, a list can grow one node at a time without moving the others.
中文

用指针连起来的节点

  • 链表是一串叫做节点的小结构体,散落在堆的各处。
  • 每个节点存一个值,以及一个指向下一个节点的指针。顺着指针就能遍历链表。
  • 和数组不同,链表可以一次加一个节点,而不用移动其他节点。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩