1.

Which of the following statements is the basic for loop for a shell sort algorithm?(a) for(increment=N/2;increment>0;increment/=2)(b) for(i=1;i=0;i- -)(d) for(i=0;i< n;i++;numelements- -)Please answer this question soon.

Answer»

Correct answer is (a) for(INCREMENT=N/2;increment>0;increment/=2)

EASIEST EXPLANATION - for(increment=N/2;increment>0;increment/=2) represents shell SORT, for(i=1;i=0;I- -) represents heap sort,for(i=0;i



Discussion

No Comment Found