wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

You are given a sequence of n elements to sort. The input sequence consists of n/k subsequences, each containing k elements. The elements in a given subsequence are all smaller than the elements in the succeeding subsequence and larger than the elements in the preceding subsequence. Thus, all that is needed to sort the whole sequence of length n is to sort the k elements in each of the n/k subsequences.
The lower bound on the number of comparisons needed to solve this variant of sorting problem is

A
Ω(n log k)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
Ω(n/k)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Ω(n k log n/k)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Ω(n)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Join BYJU'S Learning Program
CrossIcon