Registry / Library

library · v0.1.1
Ring Occupancy
Count occupied slots in a one-empty-slot circular queue with wrapped read and write cursors.
Use Ring Occupancy
use vendor::ring_occupancy::ring_occupancy;
Run the example
nest demo ring_occupancy@0.1.1
blyxc native-run ring_occupancy-demo/main.blyx
Example source and expected output
use vendor::ring_occupancy::ring_occupancy;
fn main() {
println!(ring_occupancy(6,2,8));
}
Expected output
4
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP · Browse files | f417ec28b8 | a851a25713c43c9ddc782817d1c68331a4909f3b2fa329358198727537f964de |
| 0.1.0 | Download ZIP · Browse files | 6349f23784 | 7188905f6d13486dfe578b356f5a254de8df0769622fea2dd76aec6ea2779c19 |