Hashes are good for this sort of work, the question number is the hash key and the answer is the hash value related to that keyAny time you find yourself thinking of using a number as a key into a hash, you should probably think about whether you mean to be using an array instead. In this case (but not every case: a sparse array is better implemented as a hash, if I'm not mistaken), I think that the answer would be ‘yes’.
In reply to Re^2: while loop almost correct
by JadeNB
in thread while loop almost correct
by irvson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |