Show the worked solutionWith integer keys in \([0,m-1]\), bucket (counting-style) sort uses one bucket per key value:
create \(m\) empty buckets: \(O(m)\); put each of the \(n\) keys into its bucket: \(O(n)\); concatenate the buckets in order: \(O(n+m)\).\[T=O(n+m).\]It is linear when \(m=O(n)\), but in general the \(m\) term cannot be dropped.Answer: D
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com