<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/stop-using-arrays-build-your-own-linked-list-in-swift-like-a-senior-engineer--g9yy5xgex" -->

---
title: Stop Using Arrays. Build Your Own Linked List in Swift...
description: A tutorial on building a singly linked list from scratch in Swift. Covers the conceptual difference between arrays (contiguous memory) and linked lists...
canonical: https://daily.dev/posts/stop-using-arrays-build-your-own-linked-list-in-swift-like-a-senior-engineer--g9yy5xgex
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Stop Using Arrays. Build Your Own Linked List in Swift (Like a Senior Engineer) | daily.dev
og:description: A tutorial on building a singly linked list from scratch in Swift. Covers the conceptual difference between arrays (contiguous memory) and linked lists...
og:url: https://daily.dev/posts/stop-using-arrays-build-your-own-linked-list-in-swift-like-a-senior-engineer--g9yy5xgex
og:image: https://api.daily.dev/og/posts/g9yY5xgEx.png
og:image:alt: Stop Using Arrays. Build Your Own Linked List in Swift (Like a Senior Engineer)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Stop Using Arrays. Build Your Own Linked List in Swift (Like a Senior Engineer)

**[Rebeloper](https://daily.dev/sources/rebeloper)** · 27 min read · 0 upvotes · 0 comments

## Summary

A tutorial on building a singly linked list from scratch in Swift. Covers the conceptual difference between arrays (contiguous memory) and linked lists (pointer-based nodes), then implements a LinkedListNode class with generics, and a LinkedList struct with head/tail properties, isEmpty, count, first/last convenience vars, and push/append mutating methods. Uses Swift-specific patterns like defer for count management, private(set) access control, and custom string convertible conformance.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=8sBL2snvaec>

---

Tags: [#swift](https://daily.dev/tags/swift), [#algorithms](https://daily.dev/tags/algorithms), [#data-structures](https://daily.dev/tags/data-structures)

[View this post on daily.dev](https://daily.dev/posts/stop-using-arrays-build-your-own-linked-list-in-swift-like-a-senior-engineer--g9yy5xgex)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Stop Using Arrays. Build Your Own Linked List in Swift (Like a Senior Engineer)","url":"https://daily.dev/posts/stop-using-arrays-build-your-own-linked-list-in-swift-like-a-senior-engineer--g9yy5xgex","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/stop-using-arrays-build-your-own-linked-list-in-swift-like-a-senior-engineer--g9yy5xgex"},"datePublished":"2026-03-03T20:35:16.603Z","dateModified":"2026-03-03T20:35:35.373Z","description":"A tutorial on building a singly linked list from scratch in Swift. Covers the conceptual difference between arrays (contiguous memory) and linked lists...","image":"https://i.ytimg.com/vi/8sBL2snvaec/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/8sBL2snvaec/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Rebeloper","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Rebeloper","logo":"https://media.daily.dev/image/upload/s--W0sZL8K4--/f_auto/v1726990075/logos/rebeloper","url":"https://daily.dev/sources/rebeloper"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/stop-using-arrays-build-your-own-linked-list-in-swift-like-a-senior-engineer--g9yy5xgex","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"swift,algorithms,data-structures","timeRequired":"PT27M","video":{"@type":"VideoObject","name":"Stop Using Arrays. Build Your Own Linked List in Swift (Like a Senior Engineer)","description":"A tutorial on building a singly linked list from scratch in Swift. Covers the conceptual difference between arrays (contiguous memory) and linked lists...","thumbnailUrl":"https://i.ytimg.com/vi/8sBL2snvaec/sddefault.jpg","uploadDate":"2026-03-03T20:35:16.603Z","duration":"PT27M","url":"https://api.daily.dev/r/g9yY5xgEx","embedUrl":"https://www.youtube.com/embed/8sBL2snvaec"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Rebeloper","item":"https://daily.dev/sources/rebeloper"},{"@type":"ListItem","position":3,"name":"Stop Using Arrays. Build Your Own Linked List in Swift (Like a Senior Engineer)"}]}
```

