|
|
|
|
|
by bluecalm
175 days ago
|
|
I guess the reason is that the most interesting part of the problem is implementing non-biased selection from 0 to n and once you have done it you just want to use the number so it's natural to choose from the beginning of the array and swap to the last position beyond that. |
|