@senthilnathan
prepare a hash table for the third array
now pick any element 4m array 1 add it to 1 element of array 2 now try to
find -(m+n) in hash table
since every element of arr1 will be sum to every arr of array2 and lookup in
hash table to be  O(1)
so overall complexity will be O(n2) time+O(n) space

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to