24. Unique

Difficulty: 

We have an unsorted list of integers, and need to know if all numbers in the list are unique. Without sorting the given array, return true if there are no two repeating numbers, or false otherwise.

The integers are safe to compare (no floating point issues).

Input:

isUnique([
  6,
  2,
  44,
  12,
  96,
  0,
  -12,
  66
]);

Output:

true

Time Limit:

100 (ms)

Hint (hover to see):

  • Hint #1



Results

ProblemsAcceptedWrongTimed OutError
150000

Input:

Expected Output:

Output: