Sequences & Summations
You know arithmetic and exponents. Now learn arithmetic and geometric sequences with summations.
Lessons
1. Intro
The Goal
2. What is a Sequence?
Ordered lists of numbers
3. Sequence Notation
How to write sequences
4. Arithmetic Sequences
Constant difference pattern
5. Arithmetic Sequence - Example
Finding the 50th term
6. Quiz: Arithmetic Sequences
Knowledge check
7. Geometric Sequences
Constant ratio pattern
8. Geometric Sequence - Example
Powers of two
9. Summation Notation
Sigma notation basics
10. Summation - Example
Expanding sigma notation
11. Sum of First n Integers
The famous formula
12. Quiz: Sum of Integers
Knowledge check
13. Arithmetic Series Formula
Sum of arithmetic sequence
14. Geometric Series Formula
Sum of geometric sequence
15. Geometric Series - Powers of 2
Common pattern in algorithms
16. Why Nested Loops are O(n^2)
Sum explains the complexity
17. Telescoping Sums
When terms cancel
18. Telescoping - Example
Fraction sum
19. Quiz: Summations
Knowledge check
20. Problem - Range Sum Query
LeetCode 303
21. Range Sum - Prefix Sum Idea
Precompute cumulative sums
22. Range Sum - Implementation
In pseudocode
23. Lessons from Range Sum
summary
24. Problem - Arithmetic Slices
LeetCode 413
25. Arithmetic Slices - Counting Insight
How many slices in a sequence
26. Arithmetic Slices - Algorithm
Track consecutive arithmetic elements
27. Arithmetic Slices - Implementation
In pseudocode
28. Lessons from Arithmetic Slices
summary
29. Problem - Perfect Squares
LeetCode 279
30. Perfect Squares - DP Insight
Building from smaller values
31. Perfect Squares - Iterating Squares
Loop bounds from sequence
32. Perfect Squares - Implementation
In pseudocode
33. Lessons from Perfect Squares
summary
34. Common Sum Formulas
Reference sheet
35. Summation Properties
Algebraic rules for sums
36. Quiz: Summation Properties
Knowledge check
37. Infinite Geometric Series
When ratio is less than 1
38. Practice - Tribonacci Number
LeetCode 1137
39. Practice - Climbing Stairs
LeetCode 70
40. Practice - Sum of Square Numbers
LeetCode 633
41. Section Recap
What we learned