Btw an array can have both positive and negative number. On 4 Jan 2012 11:00, "rahul patil" <[email protected]> wrote:
> > @samm: Rather than adding numbers could we add squares(or cube) of numbers > which could also be done in linear time? > > On Wed, Jan 4, 2012 at 10:56 AM, rahul patil < > [email protected]> wrote: > >> @samm: Ur solution is great. It could be used to tell that arrays are not >> similar, in linear time. But cant tell that they are 100% similar >> ur solution fails for the simple case. >> arr1: 3,4 >> arr2: 5,1 >> >> On Wed, Jan 4, 2012 at 10:49 AM, SAMMM <[email protected]> wrote: >> >>> No it's not if u use the AP series mathematical formula n(n+1)/2.. >>> Then it will be of O(n). >>> >>> -- >>> 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. >>> >>> >> >> >> -- >> Regards, >> Rahul Patil >> > > > > -- > Regards, > Rahul Patil > > -- > 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. > -- 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.
