Using Singly Linked Lists
- Singly linked lists
A singly linked list is one where each element points forwards to the next element.
- Links
Each element of a singly linked list must contain a link object.
- Headers
A header forms the anchor point for a singly linked list.
- Iterators
Iterators provide an easy way of cycling through the elements of a singly linked list.
- How to form links
To be an element of a list, each element needs to contain a link object.
- How to construct a header
The header of a linked list needs to know the type of data for each list element, and where in each element the pointer to the next element can be found.
- How to construct an iterator
An iterator allows you to access each element of the list in turn.
- How to construct and manipulate a singly linked list
Code fragments showing how to create a singly linked list and how to manipulate the list and the elements of the list.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.