Joined
Last Seen
-2 Reputation Points
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
0% Quality Score
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
0 Endorsements
Ranked #72.7K
Re:
Hi all, Can anybody tell me how to calculate the order of a recursive function. Lets take factorial function. Without using recursion [COLOR=blue]int x =1;[/COLOR] [COLOR=blue]for(int i = 1;i<=n;i++)[/COLOR] [COLOR=blue] x = x*i;[/COLOR] In this case the order will the O(n) in terms of time and in terms of space … |
|
i need help please...i ask, to make a program that accepts a positive integers and displays all odd number between 1 to the integer entered (inclusive) accept the integer in main() and use a recursive function to identify and display the odd numbers. tnx..salie |