Ad
  • Custom User Avatar

    I think you need to add test case when array doesnt have duplicates
    Because this solution worked and its not really checking if array contains duplicates or not

    if(arr.length === 0 || arr.length === 1) {
    return false;
    }
    return true