What would be a code example for this Big O Notation?

2n^2 * 2^n + logn = O(N^2*2^N)

Where do the constants come from in the code?

Is there a good web site that has programming examples of big O notation and efficiency?

Printable View

- 09-29-2001DrewBig O Notation
What would be a code example for this Big O Notation?

2n^2 * 2^n + logn = O(N^2*2^N)

Where do the constants come from in the code?

Is there a good web site that has programming examples of big O notation and efficiency? - 09-30-2001Nick
[qoute]

What would be a code example for this Big O Notation?

2n^2 * 2^n + logn = O(N^2*2^N)

[/quote]

in puedo code

Code:`for i = 1 to 2*n^2`

for j = 1 to 2^n

print "hello"

for i = 1 to log n

print "hello"

for i = 1 to N^2*2^N

print "hello"

You could do something similar to this. It's your choice

if you want to subsitute for i = 1 to n^2 with some more

meaningfull such as bubble sort.

Here's a link from google you can probably find more.

http://www.cs.ncat.edu/faculty/dichev/BigOh.html