Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
• Whenever the player fires a bullet, a node is added to the linked list.
• When the bullet hits a target, the node corresponding to that bullet is removed from the
linked list.
Cont…
• When the file completely uses the memory available in that block, and requires more
memory space, a new block is allocated to the file.
• The new block may not be contiguous to the block that was earlier allocated.
• Therefore, each block also contains the address of the next allocated block, thus forming
a linked list.
Cont…
• Adding Polynomials using Linked lists
• E.g add
4x5 + 5x4 + 2x3 + 3x2 + 7x
and
9x6 + 6x4 + 3x2