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

Function BinarySearch

Algorithm/Search/BinarySearch.ts:8–27  ·  view source on GitHub ↗

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

(nums: number[], target: number)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Search.test.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected