Question bank › Hashing
Dsa Hashing Medium

Unique Character Substring

Given a string, your task is to find the length of the longest substring that contains all unique characters. If there are no characters, return 0. Input Format: - The first line contains a single string s. Output Format: - Print the length of the longest substring with all unique characters. Example: Input: abca Output: 3 Explanation: The longest substring with all unique characters is 'abc'.

Key concepts

hashingsliding windowstrings

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.