| comparisonApril 10 2008 at 8:25 AM | MONTREALER (no login) from IP address 65.92.177.163 |
Response to Interesting variation of partial shuffle sort |
| The strongest argument for using this method, rather than the traditional
- generate an element
- check if it was previously generated
- add to the selected elements if not previously chosen
- repeat until done
is that this method closer simulated the 'real world' application of
- pick an element at random from a pool of elements
- remove it from the pool
- repeat until done
The traditional method works just as well, of course, but only simulates the application, while the 'remove it from the pool' method is just more human-logical, rather than computer-logical.
In the end, when revising an old program, it's so much easier to figure out exactly what is going on, when it's doing something that's oriented to human-thinking, rather than computer-oriented conception. |
| | Responses |
|
|