4 ms·
The example of sparse arrays is not quite "uninitialised memory", more like "stale pointers". I remember implementing Knuth's Algorithm X (http://www-cs-facult
by jrabone 15y ago
The example of sparse arrays is not quite "uninitialised memory", more like "stale pointers". I remember implementing Knuth's Algorithm X (http://www-cs-faculty.stanford.edu/~uno/papers/dancing-color.ps.gz http://www-cs-faculty.stanford.edu/~uno/papers/dancing-color... - compressed PS file) for fun, and being horrified (as a good little C programmer) by the pointer abuse. The algorithm builds a 2 dimensional linked list structure which selectively covers columns by disconnecting half the pointers, and leaving the other half dangling so it can be reconnected later. Of course it all works beautifully, I'm just not sure that I'd want to have to debug some medium-quality engineers' implementation of it...