3 ms·
A sort isn’t necessary. Duplicates can be counted in linear time by using additional memory (e.g. with a hashmap) However, the point of the article still stand
by oah 2y ago
A sort isn’t necessary. Duplicates can be counted in linear time by using additional memory (e.g. with a hashmap)
However, the point of the article still stands.