[英]Finding Minimum in Python Arrays
I have two arrays say x = [110, 10, 1000 ....]
and y = ['adas', 'asdasqe', 'ae1e' ....]
我有两个数组,分别是
x = [110, 10, 1000 ....]
y = ['adas', 'asdasqe', 'ae1e' ....]
x = [110, 10, 1000 ....]
和y = ['adas', 'asdasqe', 'ae1e' ....]
Both of these arrays are of the same length. 这两个数组都具有相同的长度。 My problem is that or printing the 10 values of
y
such that the corresponding values of x
are the 10 largest. 我的问题是或打印
y
的10个值,以使x
的相应值最大为10个。
In an average test case, x
and y
are 4000-5000 in length. 在平均测试案例中,
x
和y
的长度为4000-5000。 So speed is of the essence. 因此,速度至关重要。 Could you tell me a way of doing this using some of the inbuilt functions of python so that the operation is as fast as possible.
你能告诉我一个使用python的一些内置函数做到这一点的方法,以便操作尽可能快。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.