Swift Data Structure and Algorithms

Master the most common algorithms and data structures, and learn how to implement them efficiently using the most up-to-date features of Swift 3
Preview in Mapt

Swift Data Structure and Algorithms

Erik Azar, Mario Eguiluz Alebicto

4 customer reviews
Master the most common algorithms and data structures, and learn how to implement them efficiently using the most up-to-date features of Swift 3
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $31.99
Save 68%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$39.99
$29.99 p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Swift Data Structure and Algorithms Book Cover
Swift Data Structure and Algorithms
$ 31.99
$ 10.00
Learning JavaScript Data Structures and Algorithms - Third Edition Book Cover
Learning JavaScript Data Structures and Algorithms - Third Edition
$ 35.99
$ 10.00
Buy 2 for $20.00
Save $47.98
Add to Cart

Book Details

ISBN 139781785884504
Paperback286 pages

Book Description

Apple’s Swift language has expressive features that are familiar to those working with modern functional languages, but also provides backward support for Objective-C and Apple’s legacy frameworks. These features are attracting many new developers to start creating applications for OS X and iOS using Swift.

Designing an application to scale while processing large amounts of data or provide fast and efficient searching can be complex, especially running on mobile devices with limited memory and bandwidth. Learning about best practices and knowing how to select the best data structure and algorithm in Swift is crucial to the success of your application and will help ensure your application is a success. That’s what this book will teach you.

Starting at the beginning, this book will cover the basic data structures and Swift types, and introduce asymptotic analysis. You’ll learn about the standard library collections and bridging between Swift and Objective-C collections. You will see how to implement advanced data structures, sort algorithms, work with trees, advanced searching methods, use graphs, and performance and algorithm efficiency. You’ll also see how to choose the perfect algorithm for your problem.

Table of Contents

Chapter 1: Walking Across the Playground
What is the importance of data structures?
Fundamental data structures
Overview of data structures
Data types in Swift
Asymptotic analysis
Summary
Chapter 2: Working with Commonly Used Data Structures
Using the Swift standard library
Implementing subscripting
Understanding mutability and immutability
Interoperability between Swift and Objective-C
Swift protocol-oriented programming
Summary
Chapter 3: Standing on the Shoulders of Giants
Iterators, sequences, and collections
Stack
Queue
Circular buffer
Priority queue
StackList
Summary
Chapter 4: Sorting Algorithms
The insertion sort
Merge sort
Quick sort
Summary
Chapter 5: Seeing the Forest through the Tree
Tree – definition and properties
Overview of different types of tree
Binary trees
Binary search trees
B-trees,
Splay trees
Summary
Chapter 6: Advanced Searching Methods
Red-black trees
Red-black tree node implementation
Rotations
Insertion
AVL trees
Trie tree
Radix tree
A look at several substring search algorithms
Summary
Chapter 7: Graph Algorithms
Graph theory
Data structures
Depth first search
Breadth first search
Spanning tree
Prim algorithm
Shortest path
Dijkstra algorithm
Summary
Chapter 8: Performance and Algorithm Efficiency
Algorithm efficiency
Measuring efficiency and the Big-O notation
Orders of common functions
Evaluating runtime complexity
Summary
Chapter 9: Choosing the Perfect Algorithm
URL shortener
Searching in a huge amount of data
Summary
Epilogue

What You Will Learn

  • Get to know about the basic data structures and how to use the Swift REPL
  • Use the Swift Standard Library collections bridging to Objective-C collections, and find out about protocol-oriented programming
  • Find out about Swift generators and sequences, and see how to use them to implement advanced data structures such as Stack, StackList, Queue, and LinkedList
  • Implement sorting algorithms such as Insertion Sort, Merge Sort, and Quick Sort and understand the performance trade-offs between them
  • See how to implement various binary trees, B-Tree, and Splay Trees
  • Perform advanced searching methods using Red-Black trees, AVL trees, and Trie trees, and take a look at several substring search algorithms
  • Get to know about the data structures used in graphs and how to implement graphs such as depth-first search, breadth-first search, directed graphs, spanning tree, and shortest path
  • Explore algorithm efficiency and see how to measure it

Authors

Table of Contents

Chapter 1: Walking Across the Playground
What is the importance of data structures?
Fundamental data structures
Overview of data structures
Data types in Swift
Asymptotic analysis
Summary
Chapter 2: Working with Commonly Used Data Structures
Using the Swift standard library
Implementing subscripting
Understanding mutability and immutability
Interoperability between Swift and Objective-C
Swift protocol-oriented programming
Summary
Chapter 3: Standing on the Shoulders of Giants
Iterators, sequences, and collections
Stack
Queue
Circular buffer
Priority queue
StackList
Summary
Chapter 4: Sorting Algorithms
The insertion sort
Merge sort
Quick sort
Summary
Chapter 5: Seeing the Forest through the Tree
Tree – definition and properties
Overview of different types of tree
Binary trees
Binary search trees
B-trees,
Splay trees
Summary
Chapter 6: Advanced Searching Methods
Red-black trees
Red-black tree node implementation
Rotations
Insertion
AVL trees
Trie tree
Radix tree
A look at several substring search algorithms
Summary
Chapter 7: Graph Algorithms
Graph theory
Data structures
Depth first search
Breadth first search
Spanning tree
Prim algorithm
Shortest path
Dijkstra algorithm
Summary
Chapter 8: Performance and Algorithm Efficiency
Algorithm efficiency
Measuring efficiency and the Big-O notation
Orders of common functions
Evaluating runtime complexity
Summary
Chapter 9: Choosing the Perfect Algorithm
URL shortener
Searching in a huge amount of data
Summary
Epilogue

Book Details

ISBN 139781785884504
Paperback286 pages
Read More
From 4 reviews

Read More Reviews

Recommended for You

Swift 3 Protocol-Oriented Programming - Second Edition Book Cover
Swift 3 Protocol-Oriented Programming - Second Edition
$ 31.99
$ 10.00
Mastering Swift 3 Book Cover
Mastering Swift 3
$ 35.99
$ 10.00
Learning Xcode 8 Book Cover
Learning Xcode 8
$ 39.99
$ 10.00
Test-Driven iOS Development with Swift 3 Book Cover
Test-Driven iOS Development with Swift 3
$ 31.99
$ 10.00
Swift 4 Programming Cookbook Book Cover
Swift 4 Programming Cookbook
$ 35.99
$ 10.00
Swift 3 Object-Oriented Programming - Second Edition Book Cover
Swift 3 Object-Oriented Programming - Second Edition
$ 31.99
$ 10.00