Skip to content

Latest commit

 

History

History

SINGLY-LINKED LISTS 👆

Singly-Linked Lists are a data structure that allows allocation of memory and storage space in a non-linear manner. They are different from doubly-linked lists in that you cannot traverse them in reverse.

TABLE OF CONTENTS

IMPLEMENTATIONS

TYPE

A singly-linked list is a version of a list. It hold data by linking Nodes togehter through the use of pointers.

DATA STRUCTURE DESCRIPTION

Singly-Linked Lists

By linking the pointers for next Node points for each Node, we can traverse the Singly-Linked List for various values and store allocation non-linear memory and storage space for data.

SPACE AND TIME COMPLEXITY

Singly-Linked Lists have the following runtime complexities:

  1. O(n) for lookup times
  2. O(n) for searching (e.g. "traversing") it
  3. O(1) time for insertion
  4. O(1) time for deletion

It also has a space complexity of O(n), despite the non-linearity of its nature. This space complexity is directly related to the size of values stored in the list.