wes d2a2ba9e15 first commit | %!s(int64=4) %!d(string=hai) anos | |
---|---|---|
.. | ||
README.md | %!s(int64=4) %!d(string=hai) anos | |
code.cpp | %!s(int64=4) %!d(string=hai) anos | |
unitTest.cpp | %!s(int64=4) %!d(string=hai) anos |
by Alex Golubov tags: arrays, data_structures, sorting, numbers
Given an array of numbers, write a function that returns an array that... Has all duplicate elements removed. Is sorted from least value to greatest value. Examples uniqueSort([1, 2, 4, 3]) ➞ [1, 2, 3, 4] uniqueSort([1, 4, 4, 4, 4, 4, 3, 2, 1, 2]) ➞ [1, 2, 3, 4] uniqueSort([6, 7, 3, 2, 1]) ➞ [1, 2, 3, 6, 7] Notes N/A
Given an array of numbers, write a function that returns an array that...
uniqueSort([1, 2, 4, 3]) ➞ [1, 2, 3, 4]
uniqueSort([1, 4, 4, 4, 4, 4, 3, 2, 1, 2]) ➞ [1, 2, 3, 4]
uniqueSort([6, 7, 3, 2, 1]) ➞ [1, 2, 3, 6, 7]
N/A