Ready to begin
Choose Next step to follow the actual course records.
A bin is simply a labelled group. First put each card into its month bin: January, February and so on. Two students born in different months cannot have the same birthday. Therefore, we only need day comparisons inside each month bin.

Trace the records, compare the methods and watch what changes. Back and Reset let you try again.
Ready
Choose Next step to follow the actual course records.
Start with Next step. Predict what changes before reading the explanation.
| Month | Cards | Within-bin pairs |
|---|---|---|
| Jan | 3 | 3 |
| Feb | 2 | 1 |
| Mar | 4 | 6 |
| Apr | 1 | 0 |
| May | 4 | 6 |
| Jun | 1 | 0 |
| Jul / July | 3 | 3 |
| Aug | 1 | 0 |
| Sep | 3 | 3 |
| Oct | 2 | 1 |
| Nov | 2 | 1 |
| Dec | 4 | 6 |
| Total | 30 | 30 |
The full all-pairs method has 435 pair checks. Month binning has 30 card placements followed by 30 within-month pair checks when every pair is counted. The saving in pair checks is 405. This does not mean the entire algorithm does only 30 operations: grouping and storing cards also take work.
The source cards use both “Jul” and “July”. We normalize both spellings to the same month. Otherwise we would incorrectly split July into two bins and could miss a match in other data. Matching on a raw spelling is not always matching the real-world value.
Binning by day number is another safe option: create up to 31 day bins, then compare months inside each bin. A bin for the full day-and-month key can instead count previous occurrences while scanning. The right key depends on the question; sorting all dates is a different possible method.
Can January 7 be compared only with November 7 after month binning?
No. It belongs with the other January cards. Month binning checks day equality inside January; cross-month cards cannot match.
What if all 30 students were born in March?
The March bin would still need 435 unordered pair checks. The grouping pass adds work but does not save pair checks in that case.
Why does a one-card bin need zero pair checks?
A pair needs two different records. A singleton cannot contain a matching student pair.