I have a very large sorted array. How can I count or print all the unique elements of an array?
Suppose my array is [2,3,3,3,4,6,6,7] then the output should be 2,3,4,6,7
I know to do this in n (complexity) time. But the interviewer asked me to do this at log time? Is it possible?
source
share