𝔖 Scriptorium
✦   LIBER   ✦

📁

Data Structures and Algorithms in Swift: Implement Stacks, Queues, Dictionaries, and Lists in Your Apps

✍ Scribed by Elshad Karimov


Publisher
Apress
Year
2020
Tongue
English
Leaves
215
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Control the performance and stability of the apps you develop in Swift by working with and understanding advanced concepts in data structures and algorithms.
All professional developers have to know which data structure and algorithms to use in their development process. Your choice directly affects the performance of your application. With this book, you’ll increase the performance of your software, become a better developer, and even pass tricky interview questions better when looking at professional development opportunities.

Guided by compact and practical chapters, you'll learn the nature and proper use of data structures such as arrays, dictionaries, sets, stacks, queues, lists, hash tables, trie, heaps, binary trees, red black trees, and R-trees. Use the main differences among them to determine which will make your applications efficient and faster. Then tackle algorithms. Work with Big O notation; sorting algorithms such as Insertion, Merge, and Quick; Naive and Rabin Karp algorithms; and Graph Algorithms.
Data Structures and Algorithms in Swift encourages you to further and understand how to best choose the perfect algorithm for your application’s needs.

What You'll Learn

  • Retrieve, add, and remove elements in arrays
  • Implement stacks, queues, and lists in your apps
  • Sort algorithms and choose the best ones for your apps

Who This Book Is For
Developers who have intermediate knowledge in Swift and want to improve their code performance and pass more complex interviews

✦ Table of Contents


Table of Contents
About the Author
About the Technical Reviewer
Chapter 1: Arrays
Introduction
Main Features of Arrays
Retrieving Elements from an Array
Adding Elements to an Array
Removing Elements from an Array
Built-in Functions and Properties
isEmpty
First and Last
Reversed and Reverse
Count
Important
Conclusion
Chapter 2: Dictionaries
Introduction
Accessing Values in a Dictionary
Adding/Modifying to a Dictionary
Removing a Value from a Dictionary
Built-in Functions and Properties
isEmpty
First
Count
Keys
Conclusion
Chapter 3: Sets
Accessing, Adding, and Removing an Element of a Set
Accessing an Element
Adding an Element
Removing Elements
Set Operations
Comparison Operations
Union
Intersection
Subtracting
Symmetric Difference
Membership and Equality Operations
Set Equality
Set Membership
Conclusion
Chapter 4: Stacks
Using Swift with Stacks
Stack Structures
Stack Extensions
Conclusion
Chapter 5: Queue
Implementation
Conclusion
Chapter 6: Linked Lists
Implementation
Node
Singly Linked List
Adding New Values to a Linked List
Append
Insert
Removing New Values from a Linked List
removeLast
remove(at:)
Doubly Linked List
Append
Remove Node Method
Remove(at:)
Summary
Chapter 7: Hash Table
Creating Hash Table
Retrieving Data from a Hash Table
Updating a Value in a Hash Table
Removing a Value from a Hash Table
Summary
Chapter 8: Trees
Creation
Insertion
Searching Data
Conclusion
Chapter 9: Trie Data Structure
Why a Trie?
How It Works
Implementation
Insert
Query
Remove
Conclusion
Chapter 10: Binary Tree
Binary Tree Primer
Properties of Binary Tree
Types of Binary Trees
Implementation
Tree Traversal (Also Known As Tree Search)
In-Order Traversal
Pre-Order Traversal
Post-Order Traversal
Conclusion
Chapter 11: Binary Search Tree
Implementation
Insert
Search
Example
Delete
Deleting a Leaf
Deleting a Node with One Child
Deleting a Node with Two Children
Conclusion
Chapter 12: Red–Black Tree
Implementation
Rotation
Insertion
Deletion
Conclusion
Chapter 13: Big O
Time Complexity
Space Complexity
Drop the Constants and Nondominant Terms
How to Calculate Complexities?
Add vs. Multiply
Amortized Time
Log N Runtimes
Recursive Runtimes
Conclusion
Chapter 14: Sorting Algorithms
Bubble Sort
Implementation
Selection Sort
Implementation
Insertion Sort
Implementation
Merge Sort
Implementation
Quick Sort
Implementation
Pivot Selection
Conclusion
Chapter 15: Search Algorithms
Linear Search
Implementation
Binary Search
Implementation
Conclusion
Chapter 16: Graph Algorithms
Directed Graphs
Undirected Graphs
Weighted Graphs
Breadth-First Search (BFS)
Implementation
Depth-First Search (DFS)
Implementation
Dijkstra’s Algorithm
Implementation
Algorithm
Conclusion
Chapter 17: Choosing the Best Algorithm
Sorting Algorithms
Bubble Sort
Selection Sort
Insertion Sort
Merge Sort
Quick Sort
Search Algorithms
Linear Search vs. Binary Search
Graph Search Algorithms (GSA)
Dijkstra’s Algorithm
Index


📜 SIMILAR VOLUMES


Data Structures & Algorithms in Swift :
✍ raywenderlich Tutorial Team, Kelvin Lau, Vincent Ngo 📂 Library 📅 2021 🌐 English

<p><span>Learn Data Structures &amp; Algorithms in Swift!</span></p><p><span>Data structures and algorithms form the basis of computer programming and are the starting point for anyone looking to become a software engineer. Choosing the proper data structure and algorithm involves understanding the

Data Structures & Algorithms in Swift: I
✍ raywenderlich Tutorial Team, Kelvin Lau, Vincent Ngo 📂 Library 📅 2019 🏛 Razeware LLC 🌐 English

<strong>Learn Data Structures &amp; Algorithms in Swift!</strong><p>Data structures and algorithms form the basis of computer programming and are the starting point for anyone looking to become a software engineer. Choosing the right data structure and algorithm involves understanding the many detai

Python Data Structures and Algorithms: I
✍ Baka, Benjamin;Julian, David 📂 Library 📅 2017 🏛 Packt Publishing, Limited 🌐 English

Implement classic and functional data structures and algorithms using PythonAbout This Book* A step by step guide, which will provide you with a thorough discussion on the analysis and design of fundamental Python data structures.* Get a better understanding of advanced Python concepts such as big-o

Swift Data Structure and Algorithms
✍ Erik Azar 📂 Library 📅 2016 🏛 Packt Publishing 🌐 English

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