Classic Computer Science Problems in Swift: Essential techniques for practicing programmers cover
welcome to this free extract from
an online version of the Manning book.
to read more

About this Book


Code conventions and repository

This book contains many examples of source code, both in separate examples and inline with normal text. In both cases, source code is formatted in a fixed-width font like this to separate it from ordinary text.

In some places, original source code has been reformatted with added line breaks and reworked indentation to accommodate the available page space in the book. Wrapped code lines are often indicated with line-continuation markers ().

A GitHub repository with the code for the book is available: A zip file containing the code at the time of publication is also on the publisher’s website at


Trademarked names appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, the names are only used in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Apple, Xcode, Swift, Mac, iOS, iPhone, and macOS are registered trademarks of Apple Inc.

Book forum

About the author

About the cover illustration


Why Swift?

What is a classic computer science problem?

What kinds of problems are in this book?

Who is this book for?

Swift versioning and tools

No graphics, no UI code