Professional Documents
Culture Documents
#include <stdlib.h>
#include <stdio.h>
Example:
Lists
• Basic idea:
– Every list element consists of the data plus a pointer to
the next element
– When the pointer is NULL we are at the last element
– We keep only the reference to the first element
• Physical layout:
typedef struct node {
int data;
struct node *next;
} *list;
List Operations
Example: Deletion