Math Fundamentals18 sections · 814 units
Open in Course

Lessons from Mismatch

summary

Three lessons:

1.1. Frequency counting reveals which elements appear too many or too few times.

2.2. Compare the expected set with the actual array to find discrepancies.

3.3. Use arrays instead of maps when the key range is small and bounded.

When constraints give you a small range like 11 to nn, arrays are simpler than sets.