Karimov | Data Structures and Algorithms in Swift | E-Book | www.sack.de
E-Book

E-Book, Englisch, 215 Seiten

Karimov Data Structures and Algorithms in Swift

Implement Stacks, Queues, Dictionaries, and Lists in Your Apps
1. ed
ISBN: 978-1-4842-5769-2
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

Implement Stacks, Queues, Dictionaries, and Lists in Your Apps

E-Book, Englisch, 215 Seiten

ISBN: 978-1-4842-5769-2
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



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 arraysImplement stacks, queues, and lists in your appsSort 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


Elshad Karimov is an experienced programmer with a solid background in iOS development as well as Oracle, SQL, C#, Java, and HTML/CSS. He's familiar with the performance limits and characteristics of Swift and the nature and function of embedded databases and system datastores.

Karimov Data Structures and Algorithms in Swift jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Table of Contents;4
2;About the Author;11
3;About the Technical Reviewer;12
4;Chapter 1: Arrays;13
4.1;Introduction;13
4.2;Main Features of Arrays;14
4.3;Retrieving Elements from an Array;16
4.4;Adding Elements to an Array;17
4.5;Removing Elements from an Array;18
4.6;Built-in Functions and Properties;18
4.6.1;isEmpty;18
4.6.2;First and Last;19
4.6.3;Reversed and Reverse;19
4.6.4;Count;19
4.6.4.1;Important;20
4.7;Conclusion;20
5;Chapter 2: Dictionaries;21
5.1;Introduction;21
5.2;Accessing Values in a Dictionary;23
5.3;Adding/Modifying to a Dictionary;25
5.4;Removing a Value from a Dictionary;26
5.5;Built-in Functions and Properties;26
5.5.1;isEmpty;26
5.5.2;First;26
5.5.3;Count;27
5.5.4;Keys;27
5.6;Conclusion;27
6;Chapter 3: Sets;28
6.1;Accessing, Adding, and Removing an Element of a Set;28
6.2;Accessing an Element;28
6.3;Adding an Element;30
6.4;Removing Elements;30
6.5;Set Operations;31
6.5.1;Comparison Operations;31
6.5.1.1;Union;31
6.5.1.2;Intersection;32
6.5.1.3;Subtracting;33
6.5.1.4;Symmetric Difference;34
6.6;Membership and Equality Operations;35
6.6.1;Set Equality;35
6.6.2;Set Membership;35
6.7;Conclusion;37
7;Chapter 4: Stacks;38
7.1;Using Swift with Stacks;39
7.2;Stack Structures;42
7.3;Stack Extensions;43
7.4;Conclusion;43
8;Chapter 5: Queue;44
8.1;Implementation;46
8.2;Conclusion;51
9;Chapter 6: Linked Lists;52
9.1;Implementation;53
9.1.1;Node;54
9.2;Singly Linked List;54
9.3;Adding New Values to a Linked List;55
9.3.1;Append;56
9.3.2;Insert;57
9.4;Removing New Values from a Linked List;58
9.4.1;removeLast;59
9.4.2;remove(at:);60
9.5;Doubly Linked List;61
9.5.1;Append;63
9.5.2;Remove Node Method;64
9.5.3;Remove(at:);64
9.6;Summary;65
10;Chapter 7: Hash Table;66
10.1;Creating Hash Table;67
10.1.1;Retrieving Data from a Hash Table;68
10.2;Updating a Value in a Hash Table;69
10.3;Removing a Value from a Hash Table;70
10.4;Summary;71
11;Chapter 8: Trees;72
11.1;Creation;73
11.1.1;Insertion;74
11.1.2;Searching Data;75
11.2;Conclusion;77
12;Chapter 9: Trie Data Structure;78
12.1;Why a Trie?;78
12.2;How It Works;79
12.3;Implementation;80
12.3.1;Insert;81
12.3.2;Query;82
12.3.3;Remove;83
12.4;Conclusion;86
13;Chapter 10: Binary Tree;87
13.1;Binary Tree Primer;87
13.1.1;Properties of Binary Tree;88
13.1.2;Types of Binary Trees;88
13.2;Implementation;91
13.3;Tree Traversal (Also Known As Tree Search);91
13.3.1;In-Order Traversal;92
13.3.2;Pre-Order Traversal;93
13.3.3;Post-Order Traversal;95
13.4;Conclusion;96
14;Chapter 11: Binary Search Tree;97
14.1;Implementation;98
14.2;Insert;99
14.3;Search;102
14.3.1;Example;104
14.4;Delete;104
14.4.1;Deleting a Leaf;104
14.4.2;Deleting a Node with One Child;105
14.4.3;Deleting a Node with Two Children;106
14.5;Conclusion;110
15;Chapter 12: Red–Black Tree;111
15.1;Implementation;112
15.1.1;Rotation;115
15.1.2;Insertion;119
15.1.3;Deletion;125
15.2;Conclusion;130
16;Chapter 13: Big O;131
16.1;Time Complexity;131
16.2;Space Complexity;134
16.3;Drop the Constants and Nondominant Terms;135
16.4;How to Calculate Complexities?;136
16.5;Add vs. Multiply;138
16.6;Amortized Time;139
16.6.1;Log N Runtimes;140
16.6.2;Recursive Runtimes;141
16.7;Conclusion;142
17;Chapter 14: Sorting Algorithms;143
17.1;Bubble Sort;143
17.1.1;Implementation;146
17.2;Selection Sort;147
17.2.1;Implementation;149
17.3;Insertion Sort;150
17.3.1;Implementation;152
17.4;Merge Sort;153
17.4.1;Implementation;156
17.5;Quick Sort;158
17.5.1;Implementation;161
17.5.2;Pivot Selection;162
17.6;Conclusion;163
18;Chapter 15: Search Algorithms;164
18.1;Linear Search;164
18.1.1;Implementation;166
18.2;Binary Search;167
18.2.1;Implementation;169
18.3;Conclusion;170
19;Chapter 16: Graph Algorithms;171
19.1;Directed Graphs;172
19.2;Undirected Graphs;172
19.3;Weighted Graphs;173
19.4;Breadth-First Search (BFS);174
19.4.1;Implementation;179
19.5;Depth-First Search (DFS);182
19.5.1;Implementation;187
19.6;Dijkstra’s Algorithm;190
19.6.1;Implementation;198
19.6.2;Algorithm;199
19.7;Conclusion;202
20;Chapter 17: Choosing the Best Algorithm;203
20.1;Sorting Algorithms;204
20.1.1;Bubble Sort;204
20.1.2;Selection Sort;204
20.1.3;Insertion Sort;205
20.1.4;Merge Sort;205
20.1.5;Quick Sort;205
20.2;Search Algorithms;206
20.2.1;Linear Search vs. Binary Search;206
20.3;Graph Search Algorithms (GSA);208
20.4;Dijkstra’s Algorithm;209
21;Index;210



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.