Python: how do I sort the numbers in a list and return a two-dimensional list of index values?

problem description

Fast non-dominant scheduling problem

there are two lists as follows:
front = [[]]
n = [2meme 1memo 0je 2je 3jen 000je 0je 2je 5]

first, the indexes with the same value in n, such as n [1] = n [7] = 1scoren [9] = 5, are classified and sorted, and coexist in front

.

result: front = [2jue 5, 6], [1, 7], [0, 3, 8], [4], [9]

Apr.24,2022

   

Menu