Skip to content

Singly Linked List

Arghun-dev edited this page Aug 10, 2021 · 7 revisions

Objectives

  1. Define what a Singly Linked List is.
  2. Compare and contrast Linked Lists with Arrays
  3. Implement Insertion, removal and traversal methods on Singly Linked Lists

What is a linked list?

it's a data structure that stores whatever data you want, strings, numbers, ... and it's ordered, it's a list of data just like an array. But there's a really big distinction. in an array each item is mapped it's indexed with a number. So I can get the 5th item 6th item and anytime we add something in, it gets an index that map to its position, a linked list on the other hand just consists of a bunch of elements with no indicies who are just pointing to the next element.

. A data structure that contains a head, tail and length property.

Clone this wiki locally