Assignment 2

For each of the specifications below, write the algorithm in C in two ways: iteratively (ie using for/while loops) and recursively (ie no for/while/goto allowed!). Also, compute, showing all relevant details, the worst case time complexity of both your implementations. For each implementation, discuss the space complexity of the implementations [exact computations are better, but a heuristic discussion is acceptable].