Arithmetic & Modulo

Learn the building blocks: operations, order of operations (PEMDAS), and modular arithmetic basics.

41 lessons
126 min
Codeforces: 800-1000LeetCode: 1200-1400

Lessons

1. Intro

The Goal

2m

2. Basic Operations

Addition through division

3m

3. Order of Operations

PEMDAS rules

3m

4. Quiz: Order of Operations

Knowledge check

2m1 problems

5. Integer Division

Discarding the remainder

3m

6. Vocabulary - Floor

Rounding down

3m

7. Vocabulary - Ceiling

Rounding up

3m

8. The Modulo Operator

Getting the remainder

3m

9. Modulo Examples

Concrete calculations

3m

10. Quiz: Modulo Basics

Knowledge check

2m1 problems

11. Pattern - Even and Odd

Using modulo 2

3m

12. Pattern - Cyclic Behavior

Wrapping around

3m

13. Properties of Modulo

Addition and multiplication

4m

14. Why Properties Matter

Preventing overflow

3m

15. Negative Numbers and Modulo

Language differences

4m

16. Quiz: Modulo Properties

Knowledge check

2m1 problems

17. Problem - Power of Two Check

LeetCode 231

3m1 problems

18. Power of Two - Pattern

Repeated division by 2

3m

19. Power of Two - Algorithm

Step by step approach

4m

20. Power of Two - Implementation

In pseudocode

4m1 problems

21. Power of Two - Walkthrough

Tracing an example

4m

22. Lessons from Power of Two

summary

3m

23. Problem - Last Digit

Using modulo 10

2m

24. Last Digit - Insight

Remainder when dividing by 10

3m

25. Extracting All Digits

Repeated modulo and division

3m

26. Problem - Fizz Buzz

LeetCode 412

3m1 problems

27. Fizz Buzz - Insight

Checking divisibility

3m

28. Fizz Buzz - Implementation

In pseudocode

4m1 problems

29. Lessons from Fizz Buzz

summary

3m

30. Problem - Add Digits

LeetCode 258

3m1 problems

31. Add Digits - Loop Approach

Straightforward method

3m

32. Add Digits - Digital Root

Modulo 9 pattern

4m

33. Add Digits - Implementation

In pseudocode

3m1 problems

34. Lessons from Add Digits

summary

3m

35. Common Modulo Patterns

Practical applications

4m

36. When to Use Integer Division

Practical decision making

3m

37. Avoiding Common Mistakes

Pitfalls to watch for

4m

38. Quiz: Putting It Together

Knowledge check

2m1 problems

39. Practice - Happy Number

LeetCode 202

3m1 problems

40. Happy Number - Hint

Detecting cycles

3m

41. Section Recap

What we learned

3m

Ready to start learning?

Access all 41 lessons with interactive content and progress tracking.