A good example for new scripters

. I have a feeling that you'll be back for one of the
O(n log n) algorithms.
Quote:
Originally Posted by Crono
Had to do something like this last week or so, except I went the lame way and used Collections.sort(). Of course I messed up after it sorted it by 1 12 13 2 3 4. Should re-do it using your logic here, thanks. :]
|
If you use List<Integer>, I believe that Collections.sort() will sort numerically.