万本电子书0元读

万本电子书0元读

顶部广告

Hands-On Data Structures and Algorithms with Rust电子书

售       价:¥

8人正在读 | 0人评论 9.8

作       者:Claus Matzinger

出  版  社:Packt Publishing

出版时间:2019-01-25

字       数:35.9万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Design and implement professional level programs by exploring modern data structures and algorithms in Rust. Key Features * Use data structures such as arrays, stacks, trees, lists and graphs with real-world examples * Learn the functional and reactive implementations of the traditional data structures * Explore illustrations to present data structures and algorithms, as well as their analysis, in a clear, visual manner. Book Description Rust has come a long way and is now utilized in several contexts. Its key strengths are its software infrastructure and resource-constrained applications, including desktop applications, servers, and performance-critical applications, not forgetting its importance in systems' programming. This book will be your guide as it takes you through implementing classic data structures and algorithms in Rust, helping you to get up and running as a confident Rust programmer. The book begins with an introduction to Rust data structures and algorithms, while also covering essential language constructs. You will learn how to store data using linked lists, arrays, stacks, and queues. You will also learn how to implement sorting and searching algorithms. You will learn how to attain high performance by implementing algorithms to string data types and implement hash structures in algorithm design. The book will examine algorithm analysis, including Brute Force algorithms, Greedy algorithms, Divide and Conquer algorithms, Dynamic Programming, and Backtracking. By the end of the book, you will have learned how to build components that are easy to understand, debug, and use in different applications. What you will learn * Design and implement complex data structures in Rust * Analyze, implement, and improve searching and sorting algorithms in Rust * Create and use well-tested and reusable components with Rust * Understand the basics of multithreaded programming and advanced algorithm design * Become familiar with application profiling based on benchmarking and testing * Explore the borrowing complexity of implementing algorithms Who this book is for This book is for developers seeking to use Rust solutions in a practical/professional setting; who wants to learn essential Data Structures and Algorithms in Rust. It is for developers with basic Rust language knowledge, some experience in other programming languages is required.
目录展开

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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部