سؤال

I have 10^4 numbers in the range 10^12, what is the optimal number of bins to be used in radix sort? How do we determine the best bin size in radix sort?

هل كانت مفيدة؟

المحلول

It is a space - time trade off. The more bins you use the more memory you need but you will need fewer passes. So it really depends how you define "optimal".

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top