You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the statement is awesome but there are bugs in the code of method 2
def qsort(L):
return (qsort([y for y in L[1:] if y < L[0]]) +
L[:1] +
[y for y in L[1:] if y == L[0] + qsort([y for y in L[1:] if y > L[0]]) ) \
if len(L) > 1 else L
'[' does not appear in pairs.
maybe you need a ']' after if y == L[0] in line 4.
The text was updated successfully, but these errors were encountered:
And organize too long code in this way may ba more clear
def qsort(L):
return (qsort([y for y in L[1:] if y < L[0]]) +
L[:1] +
[y for y in L[1:] if y == L[0]] +
qsort([y for y in L[1:] if y > L[0]]) ) \
if len(L) > 1 else L
just in my opinion 😄
xlui
changed the title
method 2 in quick_sort.md may be wrong
method 2 in quick_sort.md may have a syntax error
Oct 4, 2017
the statement is awesome but there are bugs in the code of method 2
'[' does not appear in pairs.
maybe you need a ']' after
if y == L[0]
in line 4.The text was updated successfully, but these errors were encountered: