Module algorithm_rust::search

source ·
Expand description

查找算法

Functions§

  • 二分查找 O(log_{2}n) 找到时返回下标,未找到时返回插入点
  • 线性查找 当找到时返回下标,否则Option::None