pub fn check_permutation(word: &str, permutation: &str) -> bool {
    if word.len() != permutation.len() {
        return false;
    }

    word.chars().sorted().rev().collect::<String>()
        == permutation.chars().sorted().rev().collect::<String>()
}
/// First of all, find out these things: Should the comparison be case sensitive?
/// Example is God a permutation of dog?
///
/// Second: Is whitespaces significant?
/// Example "god     " is different from "dog"
First of all, find out these things: Should the comparison be case sensitive.


First of all find out these things : Should the comparison be case sensitive .
pub fn check_permutation(word: &str, permutation: &str) -> bool {
    if word.len() != permutation.len() {
        return false;
    }
    word.chars().sorted().rev().collect::<String>()
        == permutation.chars().sorted().rev().collect::<String>()
}
pub fn check_permutation ( word : & str , permutation : & str ) -> bool { if word . len ( ) != permutation . len ( ) { return false ; } word . chars ( ) . sorted ( ) . rev ( ) . collect :: < String > ( ) == permutation . chars ( ) . sorted ( ) . rev ( ) . collect :: < String > ( ) }
First of all, find out these things: Should the comparison be case sensitive?
First of all find out these things : Should the comparison be case sensitive?
word
&str
permutation
&str
word
&str
permutation
&str