feat: 1689_partitioning_into_minimum_number_of_deci_binary_numbers
This commit is contained in:
parent
47e2090304
commit
91053d7e3d
7
1689_partitioning_into_minimum_number_of_deci_binary_numbers/Cargo.lock
generated
Normal file
7
1689_partitioning_into_minimum_number_of_deci_binary_numbers/Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "partitioning_into_minimum_number_of_deci_binary_numbers"
|
||||
version = "0.1.0"
|
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "partitioning_into_minimum_number_of_deci_binary_numbers"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
@ -0,0 +1,7 @@
|
||||
pub struct Solution;
|
||||
|
||||
impl Solution {
|
||||
pub fn min_partitions(n: String) -> i32 {
|
||||
n.chars().max().unwrap() as i32 - 48
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user