Skip to content

Commit fc0946c

Browse files
authored
fixed pep8 issues
1 parent 4ca6256 commit fc0946c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

algorithms/sorting/select_sort.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
def findSmallest(arr):
2+
def find_smallest(arr):
33
smallest = arr[0]
44
smallest_index = 0
55

@@ -12,15 +12,15 @@ def findSmallest(arr):
1212

1313

1414

15-
def selectionSort(arr):
16-
newArr = []
15+
def selection_sort(arr):
16+
new_arr = []
1717

1818
for i in range(len(arr)):
19-
smallest = findSmallest(arr)
20-
newArr.append(arr.pop(smallest))
19+
smallest = find_smallest(arr)
20+
new_arr.append(arr.pop(smallest))
2121

22-
return newArr
22+
return new_arr
2323

2424
array = [100, 5, 72, 41, 80, 1, 99, 36, 27, 78]
2525

26-
print(selectionSort(array)) # [1, 5, 27, 36, 41, 72, 78, 80, 99, 100]
26+
print(selection_sort(array)) # [1, 5, 27, 36, 41, 72, 78, 80, 99, 100]

0 commit comments

Comments
 (0)