1.

The gap value after 3 iterations in an array with 6 elements will be _______(a) 4(b) 3(c) 2(d) 1This question was posed to me by my school principal while I was bunking the class.This key question is from Sorting in portion Sorting of Data Structures & Algorithms II

Answer»

Right option is (c) 2

Easy EXPLANATION - Initially the GAP VALUE will be 6. For the first iteration, it will be 6/1.3=4 then 4/1.3=3 for second iteration and 3/1.3=2 for the third iteration.



Discussion

No Comment Found

Related InterviewSolutions