You'll create nodes that point to each other, forming a chain. Each node is allocated separately on the heap, and pointers connect them.
This is the foundation for lists, trees, and graphs. Unlike arrays where elements sit next to each other in memory, linked structures scatter nodes anywhere on the heap. Pointers connect them logically.
This lets you insert and remove elements without shifting others, at the cost of losing random access. This problem teaches allocating structs on the heap and linking them together.
) creates a node and returns a pointer. Walking the chain follows pointers from node to node until you reach nullptr.