Introduction

 

Thank you for purchasing Classic Computer Science Problems in Swift: Essential techniques for practicing programmers. Swift is at an exciting stage in its development. As the language continues to stabilize and its popularity soars, there is a need to bring traditional computer science education to the language. The problems in this intermediate book will help seasoned programmers learn the language and new programmers accelerate their CS education. This book covers such a diversity of problem-solving techniques that there is truly something for everyone.

This book is not an introduction to Swift. Apple publishes an excellent free book serving that purpose.[1] Instead, this book assumes that you have already obtained a basic working knowledge of Swift’s syntax. Mastery of Swift is by no means assumed. In fact, the book’s content was created with the assumption that it would serve as learning material to help one achieve such mastery. On the other hand, this book is not appropriate for complete beginners.

1 Apple Inc., The Swift Programming Language, http://mng.bz/6fKi.

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

Chapter 1. Small problems

1.1. The Fibonacci sequence

1.2. Trivial compression

1.3. Unbreakable encryption

1.4. Calculating pi

1.5. The Towers of Hanoi

1.6. Real-world applications

1.7. Exercises

Chapter 2. Search problems

2.1. DNA search

2.2. Maze solving

2.3. Missionaries and cannibals

2.4. Real-world applications

2.5. Exercises

sitemap