Docs.rs
algorithm_rust-0.6.0
algorithm_rust 0.6.0
Permalink
Docs.rs crate page
MIT
Links
Homepage
Repository
crates.io
Source
Owners
donjuanplatinum
Dependencies
Versions
79.07%
of the crate is documented
Platform
i686-pc-windows-msvc
i686-unknown-linux-gnu
x86_64-apple-darwin
x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
Feature flags
Rust
About docs.rs
Privacy policy
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
algorithm_
rust
0.6.0
Module search
Module Items
Functions
In crate algorithm_
rust
algorithm_rust
Module
search
Copy item path
Source
Expand description
查找算法
Functions
§
binary_
search
二分查找 O(log_{2}n) 找到时返回下标,未找到时返回插入点
linearity_
search
线性查找 当找到时返回下标,否则Option::None
max_
search
线性查找数组中的最大值
min_
and_
max
同时找min和max 只需要3(n/2)的代价 返回包含(最小值下标,最大值下标)的元组
min_
search
线性查找数组中的最小值