The programme in question was running into performance problems, and a few smart people had already banged their head against a wall solving them.
After lots of experiments and different approaches, my solution was to remove most of the advanced data structures that were in the code.
In theory, they should have given us logarithmic runtime on some common operations, but the constant factors were too large. I proved (in the mathematical and the practical sense) that a brute force scheme combined with a careful randomization would dramatically improve real world performance with a fraction of the previous line count.
Despite me removing those interesting data structures, I still count it as a great application of my algorithms-and-data-structures knowledge: a big part of expertise is to be able to spot opportunities for simplification.