Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: Calculate algorithm's complexity
Description: This is a simple example for calculating algorithm's complexity.The subject is called Algorithm Complexity analysis.
Description: This is a simple example for calculating algorithm's complexity.The subject is called Algorithm Complexity analysis.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
You must calculate the complexity of algorithm
1: sum = 0
2: for i = 1 to 4n do
3:
for j = 1 to 4n2 with step 4 do
4:
for k = n to 1 with step -2 do
5:
sum = sum + 1
6:
end for
7:
end for
8: end for
Solution:
Τhe complexity of algorithm is O(n4)
...
In
this example O(1) is constant
Title: Calculate algorithm's complexity
Description: This is a simple example for calculating algorithm's complexity.The subject is called Algorithm Complexity analysis.
Description: This is a simple example for calculating algorithm's complexity.The subject is called Algorithm Complexity analysis.