I have a list of lists.
List<List<T>> li = {
{a1,a2,a3 ... aN},
{b1,b2,b3 ... bN},
...
};
double foo(List<T> list)
{
// do something
// e.g {1,2,3}
// it = 1 + 2 + 3
return it;
}
Now I want to sort li
in such a way that higher the foo(x)
for a x
higher it should appear in a sorted list.
What is the best way in C#/Python/any other lang to this?