Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed print
  • Loading branch information
fellanonymous committed Jan 17, 2019
commit ae21a9cbae2dacf9af413d33530444b5c1d64808
3 changes: 0 additions & 3 deletions project/iterative_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def selection_sort(arr):
def insertion_sort(arr):
for i in range(1, len(arr)):
cur_index = i
print(arr)
while cur_index > 0 and arr[cur_index] < arr[cur_index - 1]:
temp = arr[cur_index - 1]
arr[cur_index - 1] = arr[cur_index]
Expand All @@ -30,8 +29,6 @@ def insertion_sort(arr):
return arr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to say you got this one working, too. Maybe today you can work on quicksort in the recursive file. 😄



print(insertion_sort([22, 55, 77, 44, 66, 88, 11, 33]))

# STRETCH: implement the Bubble Sort function below


Expand Down