yes it is n^5 On Sep 22, 8:53 am, siva viknesh <sivavikne...@gmail.com> wrote: > @Dave ... thanks dude.....So it should be O(n^5) .. am i right ?? > > On Sep 22, 8:19 am, Dave <dave_and_da...@juno.com> wrote: > > > > > > > > > @Siva: Work from the inside out, using the identities > > > sum from i = 1 to n (i) = n*(n+1)/2 > > > sum from i = 1 to n (i^2) = n*(n+1)*(2*n+1)/6 > > > sum from i = 1 to n (i^3) = n^2*(n+1)^2/4 > > > sum from i = 1 to n (i^4) = n^5/5 + n^4/2 + n^3/3 - n/30 > > > Dave > > > On Sep 21, 10:03 pm, siva viknesh <sivavikne...@gmail.com> wrote: > > > > somebody plz reply... > > > > On Sep 21, 10:53 pm, sivaviknesh s <sivavikne...@gmail.com> wrote: > > > > > for(i=0;i<n;i++) > > > > for(j=0;j<i*i;j++) > > > > for(k=0;k<j;k++) > > > > sum++; > > > > > Is it n^5 log n ..... n * (n^2 log n) * (n^2 log n) ??? > > > > > correct me if i m wrong? also anybody can tell some easy approach to > > > > tackle > > > > these ques ?? I worked out for some values of n and arrived at the > > > > ans..... > > > > .... > > > > > -- > > > > Regards, > > > > $iva- Hide quoted text - > > > > - Show quoted text -
-- 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.