MCPcopy Create free account
hub / github.com/Ainevsia/Leetcode-Rust / basic

Function basic

53. Maximum Subarray/src/main.rs:48–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47 #[test]
48 fn basic() {
49 assert_eq!(Solution::max_sub_array(vec![-2,1,-3,4,-1,2,1,-5,4]), 6);
50 assert_eq!(Solution::max_sub_array(vec![-2,1,5,4,-8,2,1,-5,4]), 10);
51 assert_eq!(Solution::max_sub_array(vec![-1]), -1);
52 assert_eq!(Solution::max_sub_array(vec![-2, -1]), -1);
53
54 }
55}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected