Skip to content

Commit 0552eab

Browse files
committed
test(medium): add specs from leetcode to koko eating bananas
1 parent 26a20cb commit 0552eab

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/medium/koko_eating_bananas.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#![allow(dead_code)]
2+
3+
pub fn min_eating_speed(piles: Vec<i32>, h: i32) -> i32 {
4+
todo!("Solve this problem")
5+
}
6+
7+
#[cfg(test)]
8+
mod tests {
9+
use super::*;
10+
11+
#[test]
12+
fn test_min_eating_speed() {
13+
assert_eq!(min_eating_speed(vec![3, 6, 7, 11], 8), 4);
14+
assert_eq!(min_eating_speed(vec![30, 11, 23, 4, 20], 5), 30);
15+
assert_eq!(min_eating_speed(vec![30, 11, 23, 4, 20], 6), 23);
16+
}
17+
}

0 commit comments

Comments
 (0)