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

What are volatile variables?

1 Answers   Mind Tree,


What should malloc() do?

0 Answers  


Explain what is the difference between text files and binary files?

0 Answers  


to find out the reverse digit of a given number

6 Answers   Infosys, Microsoft, TCS, Wipro,


what is c++ programming?

3 Answers   TCS,






main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); }

27 Answers   Advent Global Solutions, CitiGroup, Valeo Lighting Systems India Private Limited, Vishal Transformers, Wipro, Zencer,


what's the return value of malloc()

9 Answers  


what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel

1 Answers   V2 Solutions,


What is structure in c language?

0 Answers  


What header files do I need in order to define the standard library functions I use?

0 Answers  


What is the ANSI C Standard?

0 Answers   Celstream,


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

1 Answers   TCS,


Categories