sorry it shud be
sum of squares and xor and sumof elements

I think this shud work

Regards
Ankur



On Wed, Jan 4, 2012 at 9:52 PM, atul anand <atul.87fri...@gmail.com> wrote:

> @ Karthikeyan :
>
> sum of cubes fails:-
>
> arr1={2,3,0,-3} =   4
> arr2={1,1,1,1}  = 4
>
> On Wed, Jan 4, 2012 at 6:53 PM, Karthikeyan V.B <kartmu...@gmail.com>wrote:
>
>> 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.
>>
>
>  --
> 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.
>

-- 
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.

Reply via email to