User:Inthar/Code: Difference between revisions
| Line 807: | Line 807: | ||
} | } | ||
// Function for computing two properties, maximum variety and balance, while executing the subroutine to extract words only once. | // Function for computing two properties, maximum variety and balance, while executing the subroutine to extract words only once at a time for both properties. | ||
pub fn max_variety_and_balance(s: &str) -> (usize, usize) { | pub fn max_variety_and_balance(s: &str) -> (usize, usize) { | ||
if s.len() <= 1 { | if s.len() <= 1 { | ||