Circular arrays
- Stage
- 4
- Module
- M4.15
- Lessons
- 1
In this module
- Understand how circular arrays wrap around at the end back to the start.
- Use modulo arithmetic to compute circular indices.
- Implement a circular buffer or sliding window that wraps.
- Apply circular thinking to solve rotation and cyclic problems.
Before this module
Lessons
Practice
Try these on the judge. Each link opens the problem on DMOJ.
- 2020 J4Cyclic Shifts (opens on DMOJ in a new tab) DMOJ
Check whether one string is a circular shift of another.
- 2020 S4Swapping Seats (opens on DMOJ in a new tab) DMOJ
Use circular prefix sums to answer range questions that wrap around.