Hacker News new | past | comments | ask | show | jobs | submit login

Just to be clear... that's a good thing, right? =)



Not necessarily.

So the grader usually tested how much memory any exercise used over several data sets, and fit it to a quadratic. So one had to use, e.g., less than N^2 + 16N + 64 bytes.

One exercise specified that a data structure used ints, but the grader only tested it on values that could be stored in a short. The extra spare memory allowed for an alternate implementation using a more complicated data structure.

The point of the exercise was to figure out the somewhat trivial optimization that allowed the simpler data structure to run in roughly the same time, not to learn the more complicated data structure. After the more complicated solution was posted to the forums, there was really no incentive for people to figure out the simpler method.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: