Hi, guys, I have two lists of coordinates(x,y,z) one sorted by x and another sorted by y. I have have to extract the common elements in these two lists. One way would be to take the smaller list and check every element in that with the other longer list. so that would take O(nlogn) time.(for n elements of smaller array [O(n)] and to make comparison with the sorted array[O(logn)]). If I have made any mistakes in my analysis, I am sorry, I am new to this....
My question is :Is there a faster way to do this? ie to extract the common elements? Any specific algorithm for doing this? Any help would be greatly appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---