Just Eat Mar 12, 2021

Implementing Doubly Linked Lists in Swift

Article Summary

Oleg Tsibulevskiy from Just Eat Takeaway breaks down why choosing the wrong data structure could be killing your iOS app's performance. Spoiler: Arrays aren't always the answer.

This deep dive explores doubly linked lists in Swift, comparing their performance characteristics against dynamic arrays. Tsibulevskiy walks through a complete implementation with practical code examples, from basic operations to Swift protocol conformance.

Key Takeaways

Critical Insight

Doubly linked lists outperform arrays for insertion/deletion operations but trade off direct index access, making them ideal for sequential navigation use cases.

The article reveals a clever trick using Swift's enumerated method that eliminates the need for helper properties when finding nodes.

Recent from Just Eat

Related Articles