Skip to content

Commit

Permalink
Change emphasis
Browse files Browse the repository at this point in the history
  • Loading branch information
blaenk committed Dec 24, 2018
1 parent 2f7cf56 commit 67b4a9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/notes/algorithms.md
Expand Up @@ -33,7 +33,7 @@ The summation of a constant is simply the product of the constant and the range:

<div>$$ \sum_{i = 1}^n 1 = n $$</div>

The sum of the first `$n$` integers can be visualized as folding the range of values at the middle so that the first integer is paired with the last, or more generally: the `$i^\text{th}$` paired with the `$(n - i + 1)\text{th}$`. Below, the bound of `$n/2$` refers to the "folding at the middle," then each pair is added. **Note** that the sum is quadratic!
The sum of the first `$n$` integers can be visualized as folding the range of values at the middle so that the first integer is paired with the last, or more generally: the `$i^\text{th}$` paired with the `$(n - i + 1)\text{th}$`. Below, the bound of `$n/2$` refers to the "folding at the middle," then each pair is added. **Note** that the sum is _quadratic_.

<div>$$ \sum_{i = 1}^n i = \sum_{i = 1}^{n/2} (i + (n - i + 1)) = \frac {n (n + 1)} 2 $$</div>

Expand Down

0 comments on commit 67b4a9f

Please sign in to comment.