没有合适的资源?快使用搜索试试~ 我知道了~
首页Swift Data Structure and Algorithms 无水印pdf
Swift Data Structure and Algorithms 无水印pdf
需积分: 9 13 下载量 110 浏览量
更新于2023-03-16
评论
收藏 3.12MB PDF 举报
Swift Data Structure and Algorithms 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
资源详情
资源评论
资源推荐
Swift Data Structure and Algorithms
Table of Contents
Swift Data Structure and Algorithms
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Walking Across the Playground
What is the importance of data structures?
Data structures + algorithms = programs
Interactive Playgrounds
The Swift REPL
Fundamental data structures
Contiguous data structures
Arrays
Declaring an array
Retrieving elements
Adding elements
Removing elements
Linked data structures
Singly linked list
Overview of data structures
Overview of algorithms
Data types in Swift
Value types and reference types
Named and compound types
Type aliases
Collection types in the Swift standard library
Asymptotic analysis
Order of growth
Summary
2. Working with Commonly Used Data Structures
Using the Swift standard library
Why structures?
Declaring arrays in Swift
Initializing array
Adding and updating elements in an array
Retrieving and removing elements from an array
Retrieving and initializing dictionaries
Initializing a dictionary
Adding/modifying/removing a key-value pair
Retrieving values from a dictionary
Declaring sets
Initializing a set
Modifying and retrieving elements of a set
Set operations
Comparison operations
Membership and equality operations
Characteristics of tuples
Unnamed tuples
Named tuples
Implementing subscripting
Subscript syntax
Subscript options
Understanding mutability and immutability
Mutability of collections
Interoperability between Swift and Objective-C
Initialization
Swift type compatibility
Bridging collection classes
NSArray to Array
NSSet to set
NSDictionary to dictionary
Swift protocol-oriented programming
Dispatching
Protocol syntax
Protocols as types
Protocol extensions
Examining protocols for use in collections
Array literal syntax
Making an array enumerable
Sequence/IteratorProtocol
Summary
3. Standing on the Shoulders of Giants
Iterators, sequences, and collections
Iterators
Sequences
Collections
Stack
Applications
Implementation
Protocols
Queue
Applications
Implementation
Protocols
Circular buffer
Applications
Implementation
Protocols
Priority queue
Applications
Implementation
Protocols
StackList
Applications
Implementation
Protocols
Summary
4. Sorting Algorithms
The insertion sort
The algorithm
Analysis of the insertion sort
Use cases of the insertion sort
Optimizations
Merge sort
The algorithm for array-based merge sort
Analysis of merge sort
The algorithm and analysis for linked list-based merge sort
Performance comparison
Quick sort
The algorithm – Lomuto's implementation
Analysis of Lomuto's partitioning scheme
The algorithm – Hoare's implementation
Analysis of Hoare's partitioning scheme
Choice of pivot
The wrong way – first or last element
The wrong way – select random element
The right way
Improved pivot selection for quick sort algorithm
Optimizations
Summary
5. Seeing the Forest through the Tree
Tree – definition and properties
Overview of different types of tree
Binary tree
Binary search tree
B-tree
Splay tree
Red-black tree
Binary trees
Types and variations
Code
Binary search trees
Inserting a node
Tree walks (traversals)
Inorder tree walk
Preorder tree walk
Postorder tree walk
Searching
Deletion
B-trees,
Splay trees
Splay operation
Simple rotation or zig
Zig-Zig or Zag-Zag
Zig-Zag
Summary
6. Advanced Searching Methods
Red-black trees
Red-black tree node implementation
Rotations
Right rotation
Left rotation
Insertion
AVL trees
AVL tree node implementation
AVL tree rotations
Simple rotation left
Simple rotation right
Double rotation – right-left
Double rotation – left-right
Search
Insertion
Trie tree
Radix tree
A look at several substring search algorithms
Substring search algorithm examples
Naive (brute force) algorithm
The Rabin-Karp algorithm
Summary
7. Graph Algorithms
Graph theory
剩余304页未读,继续阅读
yinkaisheng-nj
- 粉丝: 763
- 资源: 6953
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- ExcelVBA中的Range和Cells用法说明.pdf
- 基于单片机的电梯控制模型设计.doc
- 主成分分析和因子分析.pptx
- 共享笔记服务系统论文.doc
- 基于数据治理体系的数据中台实践分享.pptx
- 变压器的铭牌和额定值.pptx
- 计算机网络课程设计报告--用winsock设计Ping应用程序.doc
- 高电压技术课件:第03章 液体和固体介质的电气特性.pdf
- Oracle商务智能精华介绍.pptx
- 基于单片机的输液滴速控制系统设计文档.doc
- dw考试题 5套.pdf
- 学生档案管理系统详细设计说明书.doc
- 操作系统PPT课件.pptx
- 智慧路边停车管理系统方案.pptx
- 【企业内控系列】企业内部控制之人力资源管理控制(17页).doc
- 温度传感器分类与特点.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0