I have always thought that sparse arrays was just another term for a hash.
No. Hashes are unordered collections. You can impose an order on them by requiring ordered keys and then use a hash to implement a sparse array. Additional information, such as a normal dense array containing the sorted hash keys, are needed in order to allow iteration though.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Sparse arrays?
by sauoq
in thread Sparse arrays?
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |