Contains Nearby Duplicate Using std::map

This visualization demonstrates the algorithm that checks if an array contains duplicates within distance k.

Select a test case and click "Next Step" to begin the animation.
Result:
Color Key:
Current Element
Previous Occurrence
Duplicate Within Distance k