well for iterative algorithms check: 1. If your loop doesn't a constant number of iteration then it's O(1) 2. if it does up to n iterations it O(n) 3. nested loop with up to n in the outer, up to k in the inner is O(n*k) 4. for recursive algorithms see masters theorem
On 16 ספטמבר, 12:00, "sharad kumar" <[EMAIL PROTECTED]> wrote: > 2 ways boss. > on check for no of nested for loops if9one within another it n^2. > or check wats man step of ur computing .use above principle > > On Mon, Sep 15, 2008 at 11:44 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: > > > > > > > The simplest way of computing the time complexity....-הסתר טקסט מצוטט- > > -הראה טקסט מצוטט- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
