Hands-On Data Structures and Algorithms with Rust
Claus Matzinger更新时间:2021-07-02 14:12:31
最新章节:Leave a review - let other readers know what you thinkcoverpage
Title Page
Copyright and Credits
Hands-On Data Structures and Algorithms with Rust
About Packt
Why subscribe?
Packt.com
Foreword
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the color images
Download the example code files
Conventions used
Get in touch
Reviews
Hello Rust!
Rust in 2018
The 2018 edition
The Rust language
Objects and behavior
Going wrong
Macros
Unsafe
Borrowing and ownership
Exceptional lifetimes
Multiple owners
Concurrency and mutability
Immutable variables
Shadowing
Interior mutability
Moving data
Sharing data
Send and Sync
Deeper into Rust
Requests for Comments (RFCs)
Summary
Questions
Further reading
Cargo and Crates
Cargo
Project configuration
The manifest – Cargo.toml
Package
Profiles
Dependencies
Dependencies – Cargo.lock
Commands
The compile and run commands
Testing
Third-party subcommands
Crates
Rust libraries and binaries
Static and dynamic libraries
Linking and interoperability
FFI
Wasm
The main repository – crates.io
Publishing
Summary
Questions
Further reading
Storing Efficiently
Heaps and stacks
Sized and unsized
Generics
Accessing the box
Copying and cloning
Immutable storage
States and reasoning
Concurrency and performance
Summary
Questions
Further reading
Lists Lists and More Lists
Linked lists
A transaction log
Adding entries
Log replay
After use
Wrap up
Upsides
Downsides
Doubly linked list
A better transaction log
Examining the log
Reverse
Wrap up
Upsides
Downsides
Skip lists
The best transaction log
The list
Adding data
Leveling up
Jumping around
Thoughts and discussion
Upsides
Downsides
Dynamic arrays
Favorite transactions
Internal arrays
Quick access
Wrap up
Upsides
Downsides
Summary
Questions
Further reading
Robust Trees
Binary search tree
IoT device management
More devices
Finding the right one
Finding all devices
Wrap up
Upsides
Downsides
Red-black tree
Better IoT device management
Even more devices
Balancing the tree
Finding the right one now
Wrap up
Upsides
Downsides
Heaps
A huge inbox
Getting messages in
Taking messages out
Wrap up
Upsides
Downsides
Trie
More realistic IoT device management
Adding paths
Walking
Wrap up
Upsides
Downsides
B-Tree
An IoT database
Adding stuff
Searching for stuff
Walking the tree
Wrap up
Upsides
Downsides
Graphs
The literal Internet of Things
Neighborhood search
The shortest path
Wrap up
Upsides
Downsides
Summary
Questions
Exploring Maps and Sets
Hashing
Create your own
Message digestion
Wrap up
Maps
A location cache
The hash function
Adding locations
Fetching locations
Wrap up
Upsides
Downsides
Sets
Storing network addresses
Networked operations
Union
Intersection
Difference
Wrap up
Upsides
Downsides
Summary
Questions
Further reading
Collections in Rust
Sequences
Vec<T> and VecDeque<T>
Architecture
Insert
Look up
Remove
LinkedList<T>
Architecture
Insert
Look up
Remove
Wrap up
Maps and sets
HashMap and HashSet
Architecture
Insert
Lookup
Remove
BTreeMap and BTreeSet
Architecture
Insert
Look up
Remove
Wrap up
Summary
Questions
Further reading
Algorithm Evaluation
The Big O notation
Other people's code
The Big O
Asymptotic runtime complexity
Making your own
Loops
Recursion
Complexity classes
O(1)
O(log(n))
O(n)
O(n log(n))
O(n²)
O(2n)
Comparison
In the wild
Data structures
Everyday things
Exotic things
Summary
Questions
Further reading
Ordering Things
From chaos to order
Bubble sort
Shell sort
Heap sort
Merge sort
Quicksort
Summary
Questions
Further reading
Finding Stuff
Finding the best
Linear searches
Jump search
Binary searching
Wrap up
Summary
Questions
Further reading
Random and Combinatorial
Pseudo-random numbers
LCG
Wichmann-Hill
The rand crate
Back to front
Packing bags or the 0-1 knapsack problem
N queens
Advanced problem solving
Dynamic programming
The knapsack problem improved
Metaheuristic approaches
Example metaheuristic – genetic algorithms
Summary
Questions
Further reading
Algorithms of the Standard Library
Slicing and iteration
Iterator
Slices
Search
Linear search
Binary search
Sorting
Stable sorting
Unstable sorting
Summary
Questions
Further reading
Assessments
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Other Books You May Enjoy
Leave a review - let other readers know what you think
更新时间:2021-07-02 14:12:31