The third question was about to write a function in Python that finds the rarest number in a list with nlogn complexity.
Respostas da entrevista
Sigiloso
23 de mar. de 2020
Use hashmap to store the frequency of each element and return the one with lowest freq.
Sigiloso
27 de out. de 2020
But the hashmap would require O(n) time and space, right? Sorting requires O(log(n) *n ) time and O(1) space. So I think it would be great to show those two options.