Professional Documents
Culture Documents
Let's try the other method. I wanted an automatic method for it.
.So I did this
I looked at the first two places (registers) and sort them. Then I
sort the next two places and so on. If you do this many times
(repeat it) you will get them sorted. Like this
25413
25431
25431
52431
52431
52431
54231
54231
54231
54321
You just have to make a look that sort the registers like this and
repeat the loop again equal to number of registers. I mean two
.loops inside each other
You can develop this method as you can to make the time taken
less. You don't have to sort the sorted registers again at the end
of the array because every loop you have already sorted a
.register