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

Function even

33. Search in Rotated Sorted Array/src/main.rs:71–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69
70 #[test]
71 fn even() {
72 assert_eq!(Solution::search(vec![4,5,6,7,0,1,2,3], 4), 0);
73 assert_eq!(Solution::search(vec![4,5,6,7,0,1,2,3], 5), 1);
74 assert_eq!(Solution::search(vec![4,5,6,7,0,1,2,3], 6), 2);
75 assert_eq!(Solution::search(vec![4,5,6,7,0,1,2,3], 7), 3);
76 assert_eq!(Solution::search(vec![4,5,6,7,0,1,2,3], 0), 4);
77 assert_eq!(Solution::search(vec![4,5,6,7,0,1,2,3], 1), 5);
78 assert_eq!(Solution::search(vec![4,5,6,7,0,1,2,3], 2), 6);
79 assert_eq!(Solution::search(vec![4,5,6,7,0,1,2,3], 3), 7);
80 }
81
82 #[test]
83 fn odd() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected