A Unique String
Given a lowercase alphabet string s
, determine whether it has all unique characters.
Constraints
0 ≤ n ≤ 100,000
wheren
is the length ofs
https://binarysearch.com/problems/A-Unique-String
Examples
Example 1
Input
- s =
"abcde"
Output
- answer =
True
Explanation
All characters only occur once
Example 2
Input
- s =
""
Output
- answer =
True
Explanation
All characters occur once (of which there are none)
Example 3
Input
- s =
"aab"
Output
- answer =
False
Explanation
There’s two a
s
Leave a comment