Registry / Library

library · v0.1.1
Majority Index
Find an index containing a strict majority using cancellation and a verification pass. Return minus one if none exists.
Use Majority Index
use vendor::majority_index::majority_index;
Run the example
nest demo majority_index@0.1.1
blyxc native-run majority_index-demo/main.blyx
Example source and expected output
use vendor::majority_index::majority_index;
fn main() {
println!(majority_index([7,7,2]));
}
Expected output
0
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP · Browse files | c3a034d381 | 37ea819516dda9bf39d2683b07b6f593a79f6319a2f51fac43cce22a9900de5b |
| 0.1.0 | Download ZIP · Browse files | 6349f23784 | add1e26310a60d488789dae49ae5aa93dd5b12e9979b0ddd1cc02634f7b9512e |