Step Count Method to Measure Time Complexity of an Algorithm - Part 2

preview_player
Показать описание


This video explains how to derive the time complexity of an algorithm using step count method on nested loops.

Frequency Count method
Time complexity on nested loops
Analysis of algorithms with nested loops
Transpose of a matrix
Analysis of transpose of matrix
Measure time complexity of nested loop using step count method
Рекомендации по теме
Комментарии
Автор

Awesome demonstration! You're method of the concepts are clear and precise. Thanks for sharing.

shaunlewis
Автор

wahh sir my all concepts cleareddd wooo, waiting for more examples mja agya

sumitgoyal
Автор

Can't wait for your next video.... Waiting for asymtodic notation and divide and conquer design techniques.

daipayanhati
Автор

Hey, thanks for this video! Can you guide me the case below

For(i:0 to n)
{
For(j:0 to m)
{

Print(k)
}
}

Thanks in advance!!!

kumargagare
Автор

You shoud've gone for bigger algorithms with more functiond this time

tarunreddy
Автор

for(int i=0 ; i<n;i++)

i=0 1
i<n n+1
i++ ----> 2n (i++ ---> i=i+1)

is it cottect???

buddhiniwalakuluarachchi
Автор

Can you please provide the solution for this problem.
Thanks in advance !!!



for(i=1 ; i<n ; i++)
{
small pos = i ;
smallest= Array [small pos];
for(j=i+1 ; j<n ; j++)
{
if(Array [j] < smallest)
{
small pos=j;
smallest= Array [small pos];
}
}

Array [small pos] = Array [i]
Array [i] = smallest;
}

adboro
Автор

Thanks for an amazing video!! I have a problem. Can you provide the solution for this problem. Thanks again!
#include<stdio.h>

int main()
{
int array[100], maximum, size, c, location = 1;
printf("Enter the number of elements in array\n");
scanf("%d", &size);
printf("Enter %d integers\n", size);

for(c=0; c<size; c++)
scanf("%d", &array[c]);
maximum = array[0];

for(c=1; c<size; c++){
if(array[c]>maximum){
maximum = array[c];
location = c+1;
}
}
printf("Maximum element is present at location %d and it's value is %d.\n", location, maximum);
return 0;
}

nfiaa
Автор

C3 step ma second loop ma n-2 Kai rite

ruchigambhava
Автор

input size 75 ho then kia ho gye steps?

zoharehman
join shbcf.ru