I hope u can do better... try this.. use a hash table and try inserting all elements of 1st list and then insert the elements of second list. if u find an element already existing when u insert from second list then add it to a new list. the new list has the common elements...
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.