Ad
  • Custom User Avatar

    It is slower (in regards to time complexity) in some specific cases, compared to solution where we compare each element to the saved value and then return instanly when the mismatch is found. In this solution you always have to loop through the whole array at least once.