Reputation: 7502
I have two arrays say x = [110, 10, 1000 ....]
and 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.
In an average test case, x
and y
are 4000-5000 in length. 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.
Upvotes: 2
Views: 110