Contents    Page-10    Prev    Next    Page+10    Index   

Array as a Map

Suppose that:

In this case, the best map to use is an array:

When it is applicable, use an array in your programs rather than a switch statement: