Elliott Plack
COSC 501
Towson University
Fall 2013
A simple program to develop several recursive functions.
Problem:
Develop three functions that must satisfy the Big-O requirements as shown below
- Develop a function that uses a loop to calculate xn in O(n)
- Develop a function that recursively calculates xn in O(n)
- Develop a function that recursively calculates xn in O(log n)
- Develop a function that has O(2n) time complexity.