
The new algorithm does not use any array initialisation. Instead of that the only integer variable "index" is initialized. It is not using any bitwise operations and shifts as well. The well-known algorithm (an efficient representation for sparse sets) is mentioned as exercise 2.12 in "The Design and Analysis of Computer Algorithms" by Alfred Aho, John Hopcroft and Jeffrey Ullman. It is described here http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.30.7319 and here http://research.swtch.com/2008/03/using-uninitialized-memory-for-fun-and.html