DEV Community

Tyler Caprioli
Tyler Caprioli

Posted on


Arrays vs Linked Lists

Data structures are a core concept in computer science, and knowing how to identify and utilize each system correctly is the difference between an engineer and a developer. Today I'll be comparing arrays and linked lists, two prevalent data structures.


  • orders items sequentially
  • flexible size (if array is dynamic)


  • arrays store items next to each other in memory while linked lists items aren't
  • static arrays aren't flexible in size like linked lists are
  • arrays are better for looking up items then linked lists are
  • It's easier to perform operations on the ends of linked lists than it is on arrays

Top comments (1)

pentacular profile image

A more crucial difference is that linked lists can share structure, and this allows for efficient immutable structures.

You can think of a linked list as a tree branch, seen starting from a leaf and proceeding toward the root.

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git