Creating a singly-linked list without a dummy head node.
Table of Contents
A circular linked list is a list composed of nodes held together by pointers. Each node contains two pointers: a pointer to the node after it and pointer to the node before it. In a circular linked list, the last node points back around to the first node, and the first node points backwards toward the last node. In addition, this list also contains a dummy head node. This is a node that does not contain data, but is present so that even an empty list with no data will have at least one node in it. This helps to simplify the code for many of the data structure's methods by removing a bunch of annoying special cases.
The picture below illustrates the structure of this data structure.
The objective of this program is to produce a singly-linked list without a dummy head node. The list will contain two pointers: a pointer to the first item in the list and a pointer to the last item in the list. Each node will contain only a next pointer that points to the node after it in the list. The next pointer for the last node in the list will be set to nullptr.
To get a local copy up and running follow these simple steps.
Things you need to use the software.
- MacOS
- Xcode
Clone this repo.
git clone https://github.com/vmthanh-bi/Single-Linked-List.git
See the open issues for a list of proposed features (and known issues).
Tony Vu - @vmthanh.bi - vmthanh.bi@gmail.com
Project Link: https://github.com/vmthanh-bi/Single-Linked-List