Assignment-I
1. What is an algorithm? Discuss its characteristics.
2. Discuss three ways to compute greatest common divisor of m and n.
3. Discuss in brief about "General Analysis Framework"
4. What is basic operation? Find the basics operations in following code.
[a]
i=1,prod=1;
while(i<=n)
{
prod=prod*i;
i=i+1;
}
printf("\n Factorial is %f",prod);
[b]
for(i=0;i<n;i++)
{
for(j=0;j<n-i-1;j++)
{
if (a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
5. What is the unit used by computer professionals to measure the running time of designed algorithm?
2. Discuss three ways to compute greatest common divisor of m and n.
3. Discuss in brief about "General Analysis Framework"
4. What is basic operation? Find the basics operations in following code.
[a]
i=1,prod=1;
while(i<=n)
{
prod=prod*i;
i=i+1;
}
printf("\n Factorial is %f",prod);
[b]
for(i=0;i<n;i++)
{
for(j=0;j<n-i-1;j++)
{
if (a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
5. What is the unit used by computer professionals to measure the running time of designed algorithm?
No comments:
Post a Comment