cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Need help with Big O notation
Need help with Big O notation
Oct 27, 2011 at 3:41am UTC
nomdaweb
(20)
I have no problem finding the run time complexity of expressions (such as 5n^5+n^2), but I am having trouble finding the max number of executions in a function. such as
1
2
3
4
void
func(
int
x) {
for
(
int
i=0; i<x; i++) cout << i << endl;
in this case the I am looking for the number of operations executed by the function when the value of x is 10. Can someone help me out?
Topic archived. No new replies allowed.