in reply to rebuilding hashes

A couple of things. First, you really ought to use an array here, instead of simulating an array with a hash. Second, I doubt you want to sort lexicographically. Third, it's showing four twice because you never delete the highest number when re-assigning the numbers.

I'm not going to waste time in showing you corrected code. Your design is absurd. Use an array.

Abigail

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.