本文介绍了如果是在适当的时候使用基数排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是对数据的约束让你能够使用基数排序?

What are the constraints on your data for you to be able to use Radix sort?

如果我整理整数大名单,会是适当的使用基数排序?为什么基数排序没有使用更多?

If I'm sorting a large list of integers, would it be appropriate to use Radix sort? Why is Radix sort not used more?

推荐答案

这是伟大的,当你有一个大的数据集与在某种程度上制约键。例如,当你需要订购的64位数字的1百万阵列,它可以用于由8至少显著位进行排序,然后由下一个8,等等(施加8倍)。这样,这个阵列可在8 * 1M操作进行排序,而不是1M *日志(1M)。

It's great when you have a large set of data with keys that are somehow constrained. For example, when you need to order a 1-million array of 64-bit numbers, it can be used to sort by 8 least significant bits, then by the next 8, and so on (applied 8 times). That way this array can be sorted in 8*1M operations, rather than 1M*log(1M).

这篇关于如果是在适当的时候使用基数排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 04:38
查看更多