Registry / Library

library · v0.1.0
PeakSlots
Find peak simultaneous occupancy of half-open intervals.
Use PeakSlots
use vendor::peakslots::peakslots;
Run the example
nest demo peakslots@0.1.0
blyxc native-run peakslots-demo/main.blyx
Example source and expected output
use vendor::peakslots::peakslots;
fn main() {
let starts = [0, 2, 4];
let ends = [4, 5, 7];
let result = peakslots_overlap(starts, ends);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
2
2
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 414cd9e1a1 | 1d5dccdda2c1a4fad2830ab447b7c18ce5671c3db4abf4f15ef3c19e26447ae8 |