impl Solution { pubfndistance_between_bus_stops(distance: Vec<i32>, start: i32, destination: i32) -> i32 { let (mut val, n, mut ans) = (0, distance.len(), 0); let (mut s, mut d) = (start, destination); if s > d { swap(&mut s, &mut d); } for i in s..d { val += distance[i asusize]; } ans = val; val = 0; letmut i = d; while i != s { val += distance[i asusize]; i = (i + 1) % n asi32; } return std::cmp::min(val, ans); } }