I was asked in interview to remove duplicate student objects from list, where student object may contains different properties , condition is I should not use either set or hashmap.
I was asked in interview to remove duplicate student objects from list, where student
Share
This requires O(n*log(n)) to sort the list and O(n) to iterate through the sorted list.
Thus, the total runtime complexity is O(n*log(n)) + O(n) = O(n*log(n)).