fn main() { println!("Hello, world!"); } struct Solution {} impl Solution { pub fn diagonal_sum(mat: Vec>) -> i32 { mat.iter().enumerate() .fold(0, |acc, (i, row)| acc + row[i] + if i != row.len()-1 -i {row[row.len()-1 -i]} else {0}) } }