Skip to content
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

Merged
merged 81 commits into from
Apr 1, 2020
Merged

Allie #920

merged 81 commits into from
Apr 1, 2020

Conversation

alliebailey
Copy link
Collaborator

@alliebailey alliebailey commented Mar 25, 2020

Closes #503
Closes #622
Closes #922
Closes #923
Closes #927
Closes #928
Closes #929
Closes #932
Closes #933
...

Changes proposed in this pull request:

  • doubly linked list big o analysis
  • zoologist (bubble, insertion, selection sort) big o analysis

/spend 2 hr

@reviewer/kavuong

bitterb3rry and others added 30 commits February 12, 2020 16:23
First upload
Adding 7th card.
Updated new version
New version, old version in 'Old' folder
solving issue 538
resolving issue #539
resolving issue #540
Resolving issue #823
Resolving issue #824
Resolving issue #842
Resolving issue #843
CSC slides in markdown form. First upload
not needed
cards of act1
Activity 10 - Word Networks w/ Tweets
@alliebailey alliebailey added the Stage 1: Pre-Review Stage 1 (Pre-Review): DevRel Stage 1 label Mar 25, 2020
@mxthu313 mxthu313 self-requested a review March 25, 2020 17:47
Copy link
Contributor

@mxthu313 mxthu313 left a 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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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?

Module4_Labs/Lab7_Zoologist/Cards/41.md Show resolved Hide resolved

**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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

explain why

@mxthu313 mxthu313 added Stage 2: Post-Review Stage 2 (Post-Review): Continue Perfecting DevRel Stage 1 + DevRel Stage 2 and removed Stage 1: Pre-Review Stage 1 (Pre-Review): DevRel Stage 1 labels Mar 25, 2020
mxthu313 and others added 5 commits March 25, 2020 13:50
- 3.md checkpoint
- minor changes
- explaining code behind Big O

Closes #503
/spend 30 m
- add big o analysis
- elaborate on data strcuture implementations

Closes #622
Closes #922
Closes #923
Closes #927
Closes #928
Closes #929
Closes #932
Closes #933

/spend 4 hr
Copy link
Contributor

@mxthu313 mxthu313 left a comment

Choose a reason for hiding this comment

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

lgtm

@mxthu313
Copy link
Contributor

Can you add the closes tags in a comment? thanks

Copy link
Collaborator Author

@alliebailey alliebailey left a comment

Choose a reason for hiding this comment

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

Closes #622
Closes #922
Closes #923
Closes #927
Closes #928
Closes #929
Closes #932
Closes #933

@alliebailey
Copy link
Collaborator Author

alliebailey commented Mar 30, 2020 via email

@mxthu313
Copy link
Contributor

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

@mxthu313 mxthu313 merged commit 8a3422f into michelle Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stage 2: Post-Review Stage 2 (Post-Review): Continue Perfecting DevRel Stage 1 + DevRel Stage 2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants