Posts: 4,695
Threads: 222
Joined: Apr 2022
Reputation:
322
02-22-2026, 05:40 PM
(This post was last modified: 02-22-2026, 05:46 PM by bplus.)
I like Luke's approach allot! I've seen it before, I think, but it really works well in this particular problem that Jack presented. Before seeing Luke's sol'n I would have gone Steve's route, divide problem into 2 sorts but never ever would I touch Bubble Sort with 10 foot pole! b+LOL!
Oh 2112's nice too! hadn't seen it before this reply.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 3,446
Threads: 376
Joined: Apr 2022
Reputation:
345
ABS is the way I went as well, just like 2112. I just separated my data into high/low first, whereas he sorted and then separated. The difference in the two routines is almost trivial once you study them a bit. Great minds think alike -- which is why nobody thinks like @Pete does. His mind is anything BUT great!
Posts: 3,446
Threads: 376
Joined: Apr 2022
Reputation:
345
If you were rubbing on *that* Steve, I'm certain it was the wrong way!!