Hi, Consider, arr1={1,2,3} and arr2={-1,-2,-3}
using sum of squares method sum(arr1) = 14 ans sum(arr2) = 14 (since square of 1 and -1 is 1) so it won work with this case 1.better take the square and negate it before adding or 2.take sum of cubes pls correct me if i'm wrong Regards, Karthikeyan PSG TECH -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.