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

Answers were Sorted based on User's Feedback



What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,..........

Answer / santhoo035

c

Is This Answer Correct ?    2 Yes 0 No

What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,..........

Answer / jitendra kumar arya

c)seletoin sort

Is This Answer Correct ?    2 Yes 0 No

What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,..........

Answer / subbu

answer is a

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Interview Questions

How can I return multiple values from a function?

6 Answers  


what is the use of call back function in c?tell me with example

2 Answers   Bosch,


why do we use # in c-language?

1 Answers  


Explain what does the format %10.2 mean when included in a printf statement?

0 Answers  


to write a program, that finds the minimum total number of shelves, including the initial one, required for this loading process. The packets are named A, B, C, D, E &#133;&#133;.. Any numbers of packets with these names could be kept in the shelf, as in this example: [ZZLLAAJKRDFDDUUGGYFYYKK]. All packets are to be loaded on cars. The cars are lined in order, so that the packets could be loaded on them. The cars are also named [A, B, C, D, E,&#133;&#133;&#133;&#133;.].

2 Answers   Infosys, TCS,






What is the stack in c?

0 Answers  


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

0 Answers   Subex,


what is a NULL pointer?

2 Answers  


What is #error and use of it?

0 Answers  


is it possible to change the default calling convention in c ?

1 Answers   Aptech,


The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);

1 Answers   HCL, Public Service Commission,


How can I convert a number to a string?

0 Answers  


Categories