<aside> <img src="/icons/orbit_gray.svg" alt="/icons/orbit_gray.svg" width="40px" />
Formal Definition
A nested loop is a loop that is placed inside the body of another loop.
The loop that contains another loop is called the outer loop, and the loop inside it is called the inner loop.
</aside>
In simple words:
When one loop runs completely inside another loop, it is called a nested loop.
Key Concept
For each day:
For each period:
Teach a subject
Each period finishes completely before moving to the next day.
To count benches: