Data Structures & Algorithms in Swift (4th Edition) Год издания: 2021 Автор: Kelvin Lau, Vincent Ngo Издательство: Razeware LLC ISBN: 978-1950325405 Язык: Английский Формат: PDF/EPUB Качество: Издательский макет или текст (eBook) Количество страниц: 426 Описание: The most popular and comprehensive book on Swift algorithms & data structures! Covers search, sort, trees, stacks, and more.-Understanding how data structures and algorithms work in code is crucial for creating efficient and scalable apps and acing job interviews. Swift’s standard library and, more recently, the Swift Collections and Algorithms packages contain a robust set of general-purpose collection types and algorithms, yet they don’t cover every case! In Data Structures and Algorithms in Swift, you’ll learn how to implement the most popular and useful data structures and when and why you should use one particular data structure or algorithm over another. This set of basic data structures and algorithms will serve as an excellent foundation for building more complex and special-purpose constructs. The high-level expressiveness of Swift makes it an ideal choice for learning these core concepts without sacrificing performance. You’ll start with the fundamental structures of linked lists, queues and stacks, and see how to implement them in a highly Swift-like way. Move on to working with various types of trees, including general purpose trees, binary trees, AVL trees, binary search trees, and tries. Go beyond bubble and insertion sort with better-performing algorithms, including mergesort, radix sort, heap sort, and quicksort. Learn how to construct directed, non-directed and weighted graphs to represent many real-world models. Traverse those graphs and trees efficiently with breadth-first, depth-first, Dijkstra’s and Prim’s algorithms to solve problems such as finding the shortest path or lowest cost in a network. By the end of this book, you’ll have hands-on experience solving common issues with data structures and algorithms — and you’ll be well on your way to developing your own efficient and useful implementations!
Оглавление
Book License
Before You Begin
What You Need
Book Source Code & Forums
Dedications
About the Team
Acknowledgments
Foreword
Section I: Introduction
Chapter 1: Why Learn Data Structures & Algorithms?
Chapter 2: Complexity
Chapter 3: Swift Standard Library
Section II: Elementary Data Structures
Chapter 4: Stacks
Chapter 5: Stack Challenges
Chapter 6: Linked Lists
Chapter 7: Linked List Challenges
Chapter 8: Queues
Chapter 9: Queue Challenges
Section III: Trees
Chapter 10: Trees
Chapter 11: Tree Challenges
Chapter 12: Binary Trees
Chapter 13: Binary Tree Challenges
Chapter 14: Binary Search Trees
Chapter 15: Binary Search Tree Challenges
Chapter 16: AVL Trees
Chapter 17: AVL Tree Challenges
Chapter 18: Tries
Chapter 19: Trie Challenges
Chapter 20: Binary Search
Chapter 21: Binary Search Challenges
Chapter 22: Heaps
Chapter 23: Heap Challenges
Chapter 24: Priority Queues
Chapter 25: Priority Queue Challenges
Section IV: Sorting Algorithms
Chapter 26: O(n²) Sorting Algorithms
Chapter 27: O(n²) Sorting Challenges
Chapter 28: Merge Sort
Chapter 29: Merge Sort Challenges
Chapter 30: Radix Sort
Chapter 31: Radix Sort Challenges
Chapter 32: Heapsort
Chapter 33: Heapsort Challenges
Chapter 34: Quicksort
Chapter 35: Quicksort Challenges
Section V: Graphs
Chapter 36: Graphs
Chapter 37: Graph Challenges
Chapter 38: Breadth-First Search
Chapter 39: Breadth-First Search Challenges
Chapter 40: Depth-First Search
Chapter 41: Depth-First Search Challenges
Chapter 42: Dijkstra’s Algorithm
Chapter 43: Dijkstra’s Algorithm Challenges
Chapter 44: Prim’s Algorithm
Chapter 45: Prim’s Algorithm Challenges
Conclusion