CodingMedium
Find Largest Distance Between Character Occurrences
Filed under Fastenal
The question
Given string X and single character Y, find the largest distance (number of distinct characters excluding whitespaces) between any two occurrences of Y in X. Return -1 if not enough occurrences.
No write-up yet. Related questions below have one.
Related Fastenal questions
Collected from public candidate posts and coding forums. Updated Nov 2026.