tamilthambi
asked on
Remove duplicate elements in a array
How to remove duplicate elements in a array using hash tables and also without using hash tables.
this was an interview question.
this was an interview question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Perhaps I was not clear enough. I never said that two different values cannot produce same hash. What I said was duplicate values will have the same hash (unless ofcourse you are using some hash function like time()%value). That was the reason I said you need to search the hash bucket before eliminating an element.
Cheers!
sunnycoder