fn sort_the_words_in_a_string(s: &str) -> String {
let mut arr: Vec<&str> = s.split_whitespace().collect();
arr.sort();
let result = arr.join(" ");
result
}
fn main() {
let s = "php c rust java c++ python c#";
let sorted_s = sort_the_words_in_a_string(s);
println!("{}", sorted_s);
}
/*
run:
c c# c++ java php python rust
*/