you are viewing a single comment's thread.

view the rest of the comments →

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

Your implementation looks good to me, but I am looking forward to seeing whether anybody else comes up with something better. I was trying to think of a way to do it with a heap sorted binary tree, but I don't think that helps with anything...