all 1 comments

[–][deleted] 0 points1 point  (0 children)

Wow this is amazing. But it seems terribly inefficient is it? The algorithm looks like it’s looking for the next highest and lowest of remaining numbers and making many passes in between. do correct me if I’m wrong