โ† Nagarro questions

Longest sub-string with all distinct characters

Filed under Nagarro

Given a string `s`, find all longest substrings containing distinct characters. Return a list of all such unique longest substrings in sorted order.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Nagarro questions

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