User Tools

Site Tools


notes:data:spring2024:projects:mpg2

This is an old revision of the document!


MPG2

structures

singly-linked list

Reference: https://www.geeksforgeeks.org/introduction-to-linked-list-data-structure-and-algorithm-tutorial/

A linked list is a data structure that allows for a list of elements that can dynamically increase and decrease in size.

Usually, in C, an array can only have a static size once it is declared, and once it is filled, it can no longer get any more space or elements added to it.

Since a linked list is a series of “nodes”, or structs that point to each other, then new elements can easily be added: as long as there is enough memory to be allocated to a new struct, the last struct in a linked list can be made to point to this new struct.

malloc

notes/data/spring2024/projects/mpg2.1709181410.txt.gz · Last modified: 2024/02/29 04:36 by rspringe