Please is there a way how to sort multidimensional array in java in the following manner?
Lets have this array structure,
int graph[][] = new int[edges][3];
where every edge will have two coordinates and its weight. And I need to sort the whole array according to the weight of every edge. Just FYI I need it for finding spanning trees. Thanks