i implemented a min() and max() function for my Linear Hashtable, but i have little performance issue, because i implemented it straight forward. I just assume that the first element that has been found is the min/mix and then i compare the rest of the elements against it. Is there a faster way to find the min/max in a hash table? I couldn't find anything in my books. My second approach was to write every value in an array and then look through this, but i don't think this is faster.
Aucun commentaire:
Enregistrer un commentaire