-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allie #920
Conversation
First upload
Updated new version
New version, old version in 'Old' folder
solving issue 538
resolving issue #539
resolving issue #540
Resolving issue #823
CSC slides in markdown form. First upload
not needed
cards of act1
from master
Activity 10 - Word Networks w/ Tweets
…ryan) (Minesweeper Changes by Bryan)
This reverts commit cc9d371.
Bryan w
-doubly linked list big o analysis -zoologist (bubble, insertion, selection sort) big o analysis Closes #503 /spend 2 hr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good work. minor changes
@@ -0,0 +1,9 @@ | |||
Remember that Big O notation describes the behavior of functions as input grows, in this case as the number of elements in the doubly linked lists increases. | |||
|
|||
The time complexity O(n) describes the behavior of the access and search functions on a doubly linked list. Here, **n** refers to the size of the input. So the greater the input, in this case the number of elements in the list, the more time these operations will take. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain why? Like how the data structure (which is comprised of pointers) makes you do this?
|
||
The time complexity O(n) describes the behavior of the access and search functions on a doubly linked list. Here, **n** refers to the size of the input. So the greater the input, in this case the number of elements in the list, the more time these operations will take. | ||
|
||
The time complexity O(1) describes the behavior of insertion and deletion functions. This means that it takes constant time, or the same amount of time, no matter the amount of data in a doubly linked list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also add why this is so?
|
||
**Bubble Sort** | ||
|
||
For bubble sort, there is a different time complexity for best case and worst case. This is important to note because that means that after a certain number of iterations, or elements to sort, this method becomes very inefficient. In the best case, the time it takes to sort is O(n), but this is only in the case that it sorts an already sorted list, because no sorting needs to happen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you possibly make references to the code snippets? Like "notice how there is a nested for loop" kind of thing?
|
||
**Space Complexity** | ||
|
||
Bubble sort, insertion sort and selection sort each have a space complexity of O(1). This is also referred to as constant space complexity, since it's the same no matter the amount of data they are sorting through. This is because they all sort "in place," that is, they are acting directly on the array. This means they don't have to use up extra memory storing anything in order to sort. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oxford comma
|
||
**Selection Sort** | ||
|
||
Selection sort has basically the same time complexity as bubble and insertion sort, except it doesn't have an improved best case. It always takes O(n^2) time, even when sorting an already sorted list, so this is probably the least efficient of the three methods. However, it takes O(n^2) time in every other case, just like the other two functions, so it performs the same most of the time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain why?
|
||
**Insertion Sort** | ||
|
||
Insertion sort has the same time complexity breakdown as bubble sort. Best case scenario, it'll sort a sorted list, making O(n) time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explain why
…Allie "pulling from michelle"
- 3.md checkpoint
- minor changes - explaining code behind Big O Closes #503 /spend 30 m
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Can you add the closes tags in a comment? thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey sorry just did it — is that how you wanted me to do it?
Allie
…On Sat, Mar 28, 2020 at 9:03 PM michelle ***@***.***> wrote:
Can you add the closes tags in a comment? thanks
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#920 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOMDOAXGRUUWE3KJD47CPTLRJ3CAZANCNFSM4LTE73SA>
.
|
perfect. can you fix your merge conflicts? lmk if you need help with that |
Closes #503
Closes #622
Closes #922
Closes #923
Closes #927
Closes #928
Closes #929
Closes #932
Closes #933
...
Changes proposed in this pull request:
/spend 2 hr
@reviewer/kavuong