1.

Explain the memory representation of single linked list.

Answer»

A linked list maintains the memory location of each item in the list by using a series of ‘pointers’ within the data structure.

Every node of a singly-linked list contains the following information:

  • Data element (user’s data);
  • A link to the next element (auxiliary data).

A number of pointers are required, these are:

  1. The start pointer’ points to the first node in the list.
  2. The last node in the list has a ‘null pointer’ (which is an empty pointer)
  3. Each node has a pointer providing the location of the next node in the list.


Discussion

No Comment Found