Shortcut Rule
If the time-complexity of the function is in the form
Then the Big-Oh of the time-complexity is thus:
- If, then the time-complexity is
- If, then the time-complexity is
- If, then the time-complexity is
where represents the number of recursive calls at each level of recursion, represents by what factor smaller the input is for the next level of recursion (i.e. the number of pieces you divide the problem into), and represents the work the function does independent of any recursion (e.g. partitioning, recombining) at each level of recursion.
Read more about this topic: Recursive Call, Time-efficiency of Recursive Algorithms
Famous quotes containing the word rule:
“Heres the rule for bargains: Do other men, for they would do you. Thats the true business precept.”
—Charles Dickens (18121870)
Related Phrases
Related Words