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

Function FindPeakElement

Algorithm/Search/FindPeakElement.ts:8–23  ·  view source on GitHub ↗

* 寻找数组中的峰值,峰值即是其值大于左右相邻值的元素 * 数组可能包含多个峰值,在这种情况下,返回任何一个峰值所在位置即可 * @param {number[]} nums * @return {number}

(nums: 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