File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,13 @@ def quick_sort(ARRAY):
2929 >>> quick_sort([-2, -5, -45])
3030 [-45, -5, -2]
3131 """
32- ARRAY_LENGTH = len (ARRAY )
32+ ARRAY_LENGTH = len (ARRAY )
3333 if ( ARRAY_LENGTH <= 1 ):
3434 return ARRAY
3535 else :
3636 PIVOT = ARRAY [0 ]
37- GREATER = [element for element in ARRAY [1 :] if element > PIVOT ]
38- LESSER = [element for element in ARRAY [1 :] if element <= PIVOT ]
37+ GREATER = [ element for element in ARRAY [1 :] if element > PIVOT ]
38+ LESSER = [ element for element in ARRAY [1 :] if element <= PIVOT ]
3939 return quick_sort (LESSER ) + [PIVOT ] + quick_sort (GREATER )
4040
4141
@@ -50,5 +50,5 @@ def quick_sort(ARRAY):
5050 input_function = input
5151
5252 user_input = input_function ('Enter numbers separated by a comma:\n ' )
53- unsorted = [int (item ) for item in user_input .split (',' )]
54- print (quick_sort (unsorted ))
53+ unsorted = [ int (item ) for item in user_input .split (',' ) ]
54+ print ( quick_sort (unsorted ) )
You can’t perform that action at this time.
0 commit comments