Dsa
Strings
Warm-up
Unique Characters
Develop a program that checks if all characters in a given string are unique. The input string may contain spaces and punctuation, which should be ignored in the uniqueness check.
Input Format:
A single line containing the string.
Output Format:
'YES' if all characters are unique, 'NO' otherwise.
Example:
Input:
abcde
Output:
YES
Key concepts
stringsset
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