在没有排序的情况下查找java中的中位数 [英] Finding the median in java without sorting
本文介绍了在没有排序的情况下查找java中的中位数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在java中编写一个程序来查找三个或更多整数数组的中位数而不进行排序。我需要一些想法。谢谢
I need to write a program in java to find the median of an array of three or more integers without sorting. I need some ideas. thanks
推荐答案
您可以使用选择算法。您还可以找到相关信息,以查找中位数中位数。
You can use a Selection Algorithm. You'll also find relevant information looking for Median of Medians.
这篇关于在没有排序的情况下查找java中的中位数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文