Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bf3a5cb

Browse files
added notes for 2.4 working with big oh
1 parent fe879e2 commit bf3a5cb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

‎_posts/2013-01-17-2.2-the_big_oh_notation.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,16 @@ It's much easier to to talk in terms of simple upper and lower bounds of time-co
2727

2828
![image](images/2.2-big_oh_notation.jpg)
2929

30-
We are not concerned about small values of n (i.e., anything to the left of n0). The Big Oh notation enables us to ignore details and focus on the big picture.
30+
We are not concerned about small values of n (i.e., anything to the left of n0). The Big Oh notation enables us to ignore details and focus on the big picture.
31+
32+
## Working with Big Oh
33+
34+
* addition: the sum of two functions is governed by the dominant one
35+
36+
O(f(n)) + O(g(n)) → O(max(f(n), g(n)))
37+
38+
* constant multiplication: can be ignored (if c>0)
39+
40+
* multiplication: both operands are important:
41+
42+
O(f(n)) * O(g(n)) → O(f(n) * g(n))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /