fn arr_repeat_check(arr: &Vec<u8>) -> bool {
        let len: usize = arr.len();
        for i in 0..(len - 1) {
            for j in (i + 1)..len {
                if arr[i] != 0 && arr[i] == arr[j] {
                    return false;
                }
            }
        }
        true
    }
/// Check if there is is any duplication in given array
Check if there is is any duplication in given array
Check if there is is any duplication in given array
fn arr_repeat_check(arr: &Vec<u8>) -> bool {
        let len: usize = arr.len();
        for i in 0..(len - 1) {
            for j in (i + 1)..len {
                if arr[i] != 0 && arr[i] == arr[j] {
                    return false;
                }
            }
        }
        true
    }
fn arr_repeat_check ( arr : & Vec < u8 > ) -> bool { let len : usize = arr . len ( ) ; for i in 0 .. ( len - 1 ) { for j in ( i + 1 ) .. len { if arr [ i ] != 0 && arr [ i ] == arr [ j ] { return false ; } } } true }
Check if there is is any duplication in given array
Check if there is is any duplication in given array
arr
&Vec<u8>
arr
&Vec<u8>