Agree .. u can hardcode primes no upto certain value . primes method works in case of permutation of alphabets . else u can ALSO use the below method .. find the n^2+n of each number in the array . and check for the same in the other array .
-- 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.
