Skip to content
Open
Changes from all commits
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
25 changes: 25 additions & 0 deletions big_o_exercise/big_o_exercise.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Part 1
1. O(n)
2. O(n)
3. O(1)
4. O(n^3)
5. O(n)
6. O(log n)
Copy link
Contributor

Choose a reason for hiding this comment

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

Your answers for 6 - 8 aren't quite right. It may help to plot some of these terms and see how they grow.

7. O(log n)
8. O(n^2)
9. O(1)
10.O(n^2)
*/

/* Part 2
Copy link
Contributor

Choose a reason for hiding this comment

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

looks great!

1. T: O(n)
S: O(1)
2. T: O(1)
S: O(1)
3. T: O(n)
S: O(1)
4. T: O(n)
S: O(n)
5. T: O(n^2)
S: O(n)
*/