Was the bug in the algorithm resulting in wrong results? Was it a kind of implementation bug that happens due to peculiarities in the language/compiler?
It was a bug in the algorithm, resulting in wrong results. For example, I recall that to fix the linked-list insertion code, you needed to add a line of code to increment a pointer.