I need some help regarding list sorting. So, I have two lists, one which contains entities of type Sarcina(int Id,String desc) (lets call it ls1), and one which contains integers (lets call it ls2). Both lists have the same size. I am trying to sort both of them at the same time in descending order, interchanging the elements from the same positions in the both lists.
So, if I have ls1(Sarcina1,Sarcina2,Sarcina3) and ls2(3,5,4), and I sort ls2 as (5,4,3), I want to have in ls1 sorted as (Sarcina2,Sarcina3,Sarcina1).
Thank you.