-8

I've been trying to sort a 2D array for a while now, but it just doesn't work. Please help me solve the problem. (It would be helpful if the code is written in Java.)

Sayn
  • 1
  • 1
    Show what you've tried so far - it may be an incremental process but many readers can provide you assistance if code is shown. As you have it, it seems like you just want someone to write the code for you which is not what the site is all about. – Gardener May 31 '22 at 16:24
  • 1
    When sorting an array you decide how to sort based on each element. In this case, each element is an array. So what operation on the entire array, or individual cell for which you would make a decision on how to sort? For example, your could sort based on the sum of each `row`. Or you could sort on the sum of each row and then sort on the first element if the sums of any two rows are equal. There are many such options available on which to base your sort. And as mentioned you should show what you are trying to do. – WJS May 31 '22 at 16:34

0 Answers0