Kodeco Forums

Swift Algorithm Club: Swift Linked List Data Structure

Learn how to implement a linked list in Swift 3 in this step-by-step tutorial with illustrations and a downloadable example.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/947-swift-algorithm-club-swift-linked-list-data-structure

Question about the property declarations for “next” and “previous.” Why is “previous” declared as weak but not “next”? Thanks!

To avoid strong reference cycle. You can read this in detail here - https://www.raywenderlich.com/134411/arc-memory-management-swift.

1 Like

Thanks for this series! It’s really fun!

@chika I read the arc-memory-management-swift, but i still think “pervious” declared as week is same as “next” declared as week, am i right?

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]