5. What kind of sorting is this:
SORT (k,n)
1.[Loop on I Index]
repeat thru step2 for i=1,2,........n-1
2.[For each pass,get small value]
min=i;
repeat for j=i+1 to N do
{
if K[j]<k[min]
min=j;
}
temp=K[i];K[i]=K[min];K[min]=temp;
3.[Sorted Values will be returned]
A)Bubble Sort
B)Quick Sort
C)Selection Sort
D)Merge Sort
Answer Posted / murali
Bubble sort
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Why double pointer is used in c?
What is the difference between fread buffer() and fwrite buffer()?
how to execute a program using if else condition and the output should enter number and the number is odd only...
What are integer variable, floating-point variable and character variable?
How does pointer work in c?
What are the advantage of c language?
Write a program to print “hello world” without using semicolon?
How can I implement sets or arrays of bits?
What is a keyword?
Why can’t we compare structures?
What is the significance of an algorithm to C programming?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
What is volatile c?
Explain how do you use a pointer to a function?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?