Registry / Library

library · v0.1.1
First Inversion
Return the zero-based index of the first row that breaks ascending order, or minus one when sorted.
Use First Inversion
use vendor::first_inversion::first_inversion;
Run the example
nest demo first_inversion@0.1.1
blyxc native-run first_inversion-demo/main.blyx
Example source and expected output
use vendor::first_inversion::first_inversion;
fn main() {
println!(first_inversion([1,3,3,2]));
}
Expected output
3
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP · Browse files | 76784db077 | 5808f4f3d023041b740b66e7e48b45f96cd1cea987e51715e77def9442da73c8 |
| 0.1.0 | Download ZIP · Browse files | 6349f23784 | 720fa555829f6c9f85853efb0d8a178294d626ecb1ad8e346a842f766fd6eed1 |