Determining complexity for recursive functions (Big O notation)

The time complexity, in Big O notation, for each function: This function is being called recursively n times before reaching the base case so its O(n), often called linear. This function is called n-5 for each time, so we deduct five from n before calling the function, but n-5 is also O(n). (Actually called order of n/5 times. … Read more