Sorting algorithms/Bogosort: Difference between revisions
Content added Content deleted
(added python) |
(→{{header|Python}}: in_order alternative) |
||
Line 128: | Line 128: | ||
last = x |
last = x |
||
return True</python> |
return True</python> |
||
Alternative definition for in_order (Python 2.5) |
|||
<python>def in_order(l): |
|||
return not l or all( l[i] < l[i+1] for i in range(0,len(l)-1))</python> |