Category
Get an array of indexes of holes in an array.
Time complexity: O(n)
Space complexity: O(n)
The array to find holes in
An array of indexes of holes in the array
Array
holes([0, , 2]); // [1] Copy
holes([0, , 2]); // [1]
Get an array of indexes of holes in an array.
Time complexity: O(n)
Space complexity: O(n)