News for hackers. Stuff that matters.
Re:Show HN: Write a sort, watch it go by ginkgo on Monday September 26, 2011 @05:20PM (#3040784)
The input set is problematic because it contains every number from 0 to VA.length exactly once.

This allows "algorithms" like this:

  for x in [0...VA.length]
    while (VA.get(x) > x)
      VA.swap(VA.get(x), x)
Re:Show HN: Write a sort, watch it go by thedufer on Monday September 26, 2011 @05:28PM (#3040815)
Its not a game; its a learning tool. It doesn't bother me that people can do that.

Also, that's not going to work quite right - the values are [1..VA.length] (see the bottom of the page), while the indices are [0...VA.length].