This project focuses on finding the best and worst running times through the implementation of time complexity and curve fitting algorithms.
Github Link: Full repository can be found here
This project carries out the following tasks:
- Write an algorithm to compute the factorial of a positive integer n.
- For different values of n, we compute and plot the running time as a function of n for non-tail recursion, tail recursion and an iterative approach.
- Using a sequence obtained from above, we implement the linear search and the iterative binary search methods.
- For each approach, we compute the best and worst running times and give examples by plotting running time as a function of n.
- Use curve fitting algorithms to find the equation of the running times obtained from the previous tasks.