1.

Library sort is an online sorting algorithm.(a) true(b) falseThis question was posed to me during a job interview.This is a very interesting question from Sorting in portion Sorting of Data Structures & Algorithms II

Answer»

Correct choice is (a) true

Easy explanation - Library sort does not require the entire input DATA at the BEGINNING itself in order to sort the array. It rather creates a partial solution in every step, so FUTURE elements are not required to be considered. Hence it is an online sorting algorithm like INSERTION sort.



Discussion

No Comment Found

Related InterviewSolutions