# Big O Notation exercise (Paula Bannerman) #4

Closed
wants to merge 1 commit into
from
+10 −6

## Conversation

Projects
None yet
2 participants

### dcartist commented May 13, 2019

 comfort level 3.5/5 completeness 5/5
``` Finishing up ```
``` fb61efe ```

### Zakk reviewed May 13, 2019

 @@ -3,7 +3,7 @@ What is the worst-case time complexity for the following algorithms? #### #1 I think the code below is a linear since it's an unsorted list, and that with the higher the input the more time it would need.

👍

### Zakk reviewed May 13, 2019

 #### #2 This one looks like an quadratic time algorithm because it's a loop within a loop with a conditional. It takes more to process this one fully.

👍

### Zakk reviewed May 13, 2019

 @@ -35,7 +37,7 @@ function bubble_sort(list) { ``` #### #3 I think this is Factorial. I'm guessing because it's in the name, and it deals with negative integers. It goes within it's self.

#### Zakk May 13, 2019

Close! The name actually makes this a bit of a trick!

### Zakk reviewed May 13, 2019

 @@ -47,15 +49,17 @@ function factorial(n) { ``` #### #4 I think this one is a constant. Because no matter how much input it returns the same.

👍

### Zakk reviewed May 13, 2019

 #### #5 I think this is a linear. because the information grows over time.

👍

### Zakk reviewed May 13, 2019

 @@ -71,7 +75,7 @@ function isPalindrome(input) { ``` #### #6 I think this one is one is a logarithmic, because it's loop starting from a certain point then checking to see the results matches it.

Very close!

### Zakk reviewed May 13, 2019

 @@ -86,7 +90,7 @@ function sumOfDivisors(n) { ``` #### #7 I think this one is linear, because it's dealing with an unsorted array.

👍

### Zakk reviewed May 13, 2019

 @@ -101,7 +105,7 @@ function printAllNumbersThenSumPairs(numArray) { ``` #### #8 I think this one is a logarithmic, because it finds a certain point then goes from there to the destination. (Old school phone book)

Close!

### Zakk closed this May 13, 2019

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