Foundations — Queue — FIFO semantics, enqueue - dequeue, circular array implementation
Before you can read the parent note comfortably, you need to genuinely see eight small things. This page builds each one from nothing, in an order where every idea leans on the one before it.
1. A slot, an array, and an index

The parent note writes arr[N] — that means "an array of slots." The valid indices are then . There is no slot with index ; that is one past the end. Remembering this single fact prevents half of all queue bugs.
2. The symbol — capacity
3. front — where the oldest element sits
The picture to hold: front is a little arrow parked under one chair, saying "the next person to be served is sitting here."

When we dequeue (remove the front), we don't erase and shift everyone. We just slide the front arrow one chair to the right. The old occupant is simply forgotten, not moved.
4. count — how many are currently seated
5. "Rear" — the next free seat, derived not stored
Why can we compute it? Because the occupied chairs are always consecutive starting at front (allowing for wrap, coming next). If front is where the oldest sits and there are count people, then the first free chair is count steps past front:

Read the figure: front = 1, count = 3, so occupied chairs are and the next free one is . That is exactly front + count. So far, no modulo — because nothing has fallen off the end yet. That is section 7.
6. The % symbol — modulo (remainder)
This is the single most important new symbol on the whole topic, and the parent note leans on it constantly. We build it from the most basic thing: division with remainder.

Worked feel for the numbers (all with , so answers live in ):
See Modular Arithmetic for the same idea developed on its own.
7. Putting it together — the wrap-around formula
Now sections 5 and 6 combine. The raw rear front + count might point at a chair number , which doesn't exist. We fold it back onto the ring with modulo:
Both are the same modulo trick applied to two different arrows. Once modulo clicks, the whole circular-queue idea is just these two lines.
8. FIFO — the rule all this serves
Everything above (front, count, modulo) exists purely so that a fixed array can obey this time-order rule forever without shifting elements or running out of room prematurely. Contrast this with a stack, whose rule is the exact opposite (newest out first).
Prerequisite map
Read it top to bottom: the plain array and 0-based indexing come first; front and count are built on top; rear = front + count needs both; modulo (built separately) folds the result onto a ring; and only then does the full circular FIFO queue stand up.
Equipment checklist
If you can answer every line below without peeking, you are ready for the parent note. Reveal each to self-test.
If an array has slots, what is the largest valid index?
What does the front index point at — an element or a position?
What does count measure, and what are its minimum and maximum values?
Why is rear computed as front + count before any wrap?
front, so the first free slot is count steps past it.What does a % N (modulo) give you, in plain words?
Compute and .
Why does the circular queue need modulo at all?
State the FIFO rule in five words.
Recall One-sentence summary
A queue obeys FIFO; to run it inside a fixed array of slots we track front (where the oldest sits) and count (how many are seated), derive the next free slot as , and use modulo everywhere so the row of slots behaves like a ring.