โ† Larson & Toubro Infotech questions

Most Distinct Characters Between Two Occurrences of Character C

Filed under Larson & Toubro Infotech

The question

Given a string S and character C, find the maximum number of distinct characters that exist between any two occurrences of C in S. Return 0 if S does not contain C, and -1 if S contains a single occurrence of C.

No write-up yet. Related questions below have one.

Related Larson & Toubro Infotech questions

Collected from public candidate posts and coding forums. Updated Nov 2026.