You need a large enough hash table to avoid collisions. 50000 is a small number so the hash table shouldn't be too large. This hashing function can even depend on how your coordinates look like. If they are all integers, you could come up with some simpler hash fn which guarantees no collisions.
Also, you can add coordinates to the hash table when adding the coordinates to the list itself, instead of creating a hash table from scratch when comparing. Depending on how you form these coordinates, this may be faster ( the order remains the same). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---