feat: 1689_partitioning_into_minimum_number_of_deci_binary_numbers

This commit is contained in:
SquidSpirit 2025-08-20 02:28:00 +08:00
parent 47e2090304
commit 91053d7e3d
3 changed files with 20 additions and 0 deletions

View 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"

View File

@ -0,0 +1,6 @@
[package]
name = "partitioning_into_minimum_number_of_deci_binary_numbers"
version = "0.1.0"
edition = "2024"
[dependencies]

View File

@ -0,0 +1,7 @@
pub struct Solution;
impl Solution {
pub fn min_partitions(n: String) -> i32 {
n.chars().max().unwrap() as i32 - 48
}
}