Current collected state Current
Observed since 20 Oct, 18:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Efficient range maximum/minimum query
Efficient range maximum/minimum query.
npm install 1d-range-query
import rangeQuery from '1d-range-query';
const query = rangeQuery([1,5,10,2,5,3]);
console.log(query.max(0, 2)); // => 10 (10 is the max in [1,5,10])
console.log(query.min(2, 4)); // => 2 (2 is the min in [10,2,5])
Query the maximum value in range [from, to].
Query the minimum value in range [from, to].
Initialize: O(nlogn)
Query: O(1)
O(nlogn)
MIT
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 18:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:7029821111481ecc69d3be7295db3599af634782df16289a677a870bd31f6b85