Timeline for Worst-case expected running time for Randomized Permutation Algorithm
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 14, 2020 at 0:32 | vote | accept | bmanicus131 | ||
Apr 14, 2020 at 0:32 | vote | accept | bmanicus131 | ||
Apr 14, 2020 at 0:32 | |||||
Apr 3, 2020 at 19:57 | comment | added | bmanicus131 | Thank you for the response! Yes I have two other algorithms that solve the same computational problem much more efficiently, one is exactly how you initially described (utilizing a used array to learn from its mistakes). Another algorithm simply starts with an array of size N initialized to the first N integers in order, it then uses the randInt() method to simply shuffle the numbers already present in the array, thereby only making one pass through the array for its entire execution. I know this algorithm stated in the question is horribly inefficient, but I am forced to work with it. | |
Apr 3, 2020 at 4:27 | history | answered | Matthew C | CC BY-SA 4.0 |