MCPcopy Create free account
hub / github.com/StudyRust/leetcode_rust / main

Function main

1572-matrix-diagonal-sum.rs:23–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21// 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
22
23fn main() {
24 let mat = vec!(
25 vec!(1,2,3),
26 vec!(4,5,6),
27 vec!(7,8,9)
28 );
29 let res = diagonal_sum(mat);
30 println!("{:?}", res);
31}
32
33pub fn diagonal_sum(mat: Vec<Vec<i32>>) -> i32 {
34 let mut sum = 0;

Callers

nothing calls this directly

Calls 1

diagonal_sumFunction · 0.85

Tested by

no test coverage detected