+1
2025/3/rust/src/main.rs
+1
2025/3/rust/src/main.rs
···
7
7
let (loc, max) = bank[bank_index..bank_len - i]
8
8
.iter()
9
9
.enumerate()
10
+
// apparently the compiler is fine with reversing this and then using the standard max_by but im not. and it seems to have the same speed results. im not gonna be using tricks here ok im nice
10
11
.reduce(
11
12
|(maxi, max), (i, n)| {
12
13
if n > max { (i, n) } else { (maxi, max) }