Timeline for Implement Bogosort
Current License: CC BY-SA 2.5
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 12, 2017 at 23:07 | comment | added | gnibbler | @J843136028, Python doesn't let you have a while loop in a lambda | |
Feb 12, 2017 at 21:40 | comment | added | 0WJYxW9FMN | Wouldn't a lambda be shorter? | |
Jul 27, 2012 at 17:06 | comment | added | Matt | This may not always work: (from python random module documentation): "Note that for even rather small len(x), the total number of permutations of x is larger than the period of most random number generators; this implies that most permutations of a long sequence can never be generated." | |
May 28, 2012 at 10:39 | comment | added | ugoren |
from random import* can save a char.
|
|
Feb 3, 2011 at 18:01 | comment | added | Jonathan M Davis | The question does say that the function is supposed to return the array though - even if it isn't technically necessary to get the result. | |
Feb 3, 2011 at 14:38 | comment | added | Alexandru | Sorts in place. The passed array is modified. | |
Feb 3, 2011 at 13:47 | comment | added | hallvabo | Your function does not return the array on success. | |
Feb 2, 2011 at 21:42 | history | answered | Alexandru | CC BY-SA 2.5 |