doing an array lookup is O(n).
Huh?
Array indexing is constant time. The compiler doesn't scan the array, it
uses the switch value directly as the index (after some mathematical
james.jones@firstinvestors.com wrote:
transformation, perhaps.)
Sebastian Redl