perlquestion
donkeykong
Hi guys,
how would you mathematically prove that a hash is a more efficient and scalable data structure than an array, in a situation where you have to read a file, find all its unique keys and show the # of occurrences each unique key had in the file?
I came to the conclusion that the hash in big-oh notation is O(1) and the array is O(n), but again, how can I mathematically prove it? I appreciate your help.