Help with Big-O requriments

Can anybody direct me to where to begin?

Develop three functions that must satisfy the Big-O requirements as shown below

(1) Develop a function that uses a loop to calculate xn in O(n)
(2) Develop a function that recursively calculate xn in O(n)
(3) Develop a function that recursively calculate xn in O(logn)


Use the following numbers to test each function
a) x = 2 n = 10
b) x = 2 n = 30
c) x = 2 n = 50

You can have one program that consists of three functions described above.

Last edited on


I have the same assigment for class.

Don't worry about Big O. This is about using recursive functions.

send me a PM and I can give you some advice.

I found this to be very easy when I realized I didn't need to know BIG O, just the recursion stuff.
Topic archived. No new replies allowed.