MCPcopy Create free account
hub / github.com/Reaper622/DataStructure-Algorithm-TS / BinarySearch

Function BinarySearch

Algorithm/Search/BinarySearch.js:9–30  ·  view source on GitHub ↗

* 给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target * 写一个函数搜索 nums 中的 target,如果目标值存在返回下标,否则返回 -1。 * @param {number[]} nums 要查询的数组 * @param {number} target 查找的目标值

(nums, target)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected