SyntaxFix
Write A Post
Hire A Developer
Questions
unique only removes consecutive duplicate elements (which is necessary for it to run in linear time), so you should perform the sort first. It will remain sorted after the call to unique.
unique