Member-only story
Linked Lists and LL Algorithms in Swift
Chain it up in Swift
This article is about the implementation of linked lists in Swift. The theory is covered in my own article.
Difficulty: Beginner | Easy | Normal | Challenging
Prerequisites:
Terminology
Swift terminology
Class: An object that defines properties and methods in common
Linked List Terminology
Data structure: A way of formatting data
Head: The first (or parent, or root) node
Linked List: A linear collection of data elements, made up of a head node with zero or more connected nodes. The order of this list is given by pointers from each node to the next
Node: The basic unit of a data structure
Null Pointer: A pointer that does not point to anywhere
Pointer: An object that stores a memory address
Tail: The linked list, after the head