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.
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
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.
There are many ways of creating sequences in Swift. Let's look at some ways it can be done in this video.
It may seem intimidating, but making a custom collection is simple. Let's make one together in this video.
In this video, learn about how conforming to collection protocols can improve efficiency in your code.
Let's try to build a two-dimensional collection. How should we define the index? Find out in this video
Slices are views into collections. See how Swift uses slices to balance performance and memory usage.
Laziness is an important part of Swift. In this video you'll see the lazy types doing incredible work.
In this challenge you'll try to build a custom sequence that walks down a row or column of an Array2D.
Swift protocols and generics help solve the so-called N*M problem for data structures and algorithms. The standard library collections lead the way.