Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ isPositive
Function
isPositive
javascript/0041-first-missing-positive.js:48–48 ·
view source on GitHub ↗
(num)
Source
from the content-addressed store, hash-verified
46
([nums[index], nums[indexKey]] = [nums[indexKey], nums[index]]);
47
48
const
isPositive = (num) => 0 < num;
49
50
const
isInBound = (num, nums) => num <= nums.length;
51
Callers
1
canSwap
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected