Requires a pro subscription Pro

Advanced Swift: Sequences, Collections and Algorithms

Sequences, collections and algorithms in the Swift language are an amazing abstraction that you really need to know about. Learn the details in this course. By Ray Fix.

Login to leave a rating/review
Save for later
Share

Learning path

This is part of the Advanced Swift learning path. View Path.

Who is this for?

This course is for developers interested in getting a deeper understanding of the Swift language. It expects you to be comfortable with the basic syntax of Swift and to have perhaps written an app or two. You should be familiar with basic types in the Swift standard library.

Covered concepts

This course focuses on:

  • Sequence types
  • Collection conformance
  • Array 2D slices and collection
  • Custom sequences
  • Lazy collections

1
Toggle description

Sequences, collections and the basic algorithms that work with them allow you to solve many problems. We take a deep look at what Swift provides.

Sequences 7:10
Toggle description

There are many ways of creating sequences in Swift. Let's look at some ways it can be done in this video.

Collection 3:23
Toggle description

It may seem intimidating, but making a custom collection is simple. Let's make one together in this video.

Toggle description

In this video, learn about how conforming to collection protocols can improve efficiency in your code.

Array2D 3:15
Toggle description

Let's try to build a two-dimensional collection. How should we define the index? Find out in this video

Slices 4:38
Toggle description

Slices are views into collections. See how Swift uses slices to balance performance and memory usage.

Lazy 2:40
Toggle description

Laziness is an important part of Swift. In this video you'll see the lazy types doing incredible work.

Toggle description

In this challenge you'll try to build a custom sequence that walks down a row or column of an Array2D.

Conclusion 1:56
Toggle description

Swift protocols and generics help solve the so-called N*M problem for data structures and algorithms. The standard library collections lead the way.