Assignment No 2 Requirement 1:
Arrange the following in the least to most complexity. Here "n" is the input size for the some complexity function and n>J where J is number less than n. Every function is separated by "comma" and note that their is 5 functions to arrange.
Requirement 2:
You have to build min heap for the given array elements along with their respective array positions.
Click on adds for supporting us.
Students can download solution file from here.
Assignment No 1 Requirements:
You
are required to find the time difficulty of the following puzzles with
admiration to worst case.
Part
A:
for (i = 1 ; i<= n; i++)
{
for (i = 1
; i<= n2 ; i++)
{
for
(i = 1 ; i<= n3 ; i++)
{
a =
x+y;
}
}
}
Part
B:
for ( y = 1 ; y <= n; i++)
{
for (i = 1
; i<= n2 ; i++)
{
for
(i = 1 ; i<= n3 ; i++)
{
a =
x+y;
}
}
}
Requirement
2:
Write
a simple algorithm (Only Pseudo code) about making 3x3 matrix table and also
calculate the worst case time
complexity T(n).
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |