Problem statement

https://binarysearch.com/problems/A-Unique-String/

Solution

Just check length of set of s.

Complexity

It is O(n) for time and space.

Code

class Solution:
    def solve(self, s):
        return len(s) == len(set(s))