3 ms·Fairly sure you can do it in linear time and space without sorting.by wetmore 6y agoFairly sure you can do it in linear time and space without sorting.