Skip to content

Sorts#9

Open
markreynoso wants to merge 73 commits intomasterfrom
sorts
Open

Sorts#9
markreynoso wants to merge 73 commits intomasterfrom
sorts

Conversation

@markreynoso
Copy link
Copy Markdown
Owner

No description provided.

for i in range(len(list) - 1):
if list[i] > list[i + 1]:
holder = list[i]
list[i], list[i + 1] = list[i + 1], holder
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If you're going to just do multiple assignment anyway, why have an intermediate variable?

list[i], list[i + 1] = list[i + 1], list[i]

pip install -e .[testing][development]
```

### Linkded List Class Usage
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Typo


```

### Binaary Heap (min-heap) Class Usage
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Typo

To use insert_sort, from insert_sort import insert_sort.
Pass in a list of numbers insert_sort(list).

* _bubble_sort(list) (O(n^2))_
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You should probably change this to reflect that you're using Insertion Sort

return list


if __name__ == '__main__':
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You're not showing me the best/worst/average cases as was requested by the Spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants