leet-code/partitioning-into-minimum-n.../sol.rs

7 lines
144 B
Rust
Raw Normal View History

2022-07-05 23:33:16 +00:00
impl Solution {
pub fn min_partitions(n: String) -> i32 {
(n.bytes()
.max()
.unwrap() - b'0') as i32
}
}