#C12270. Unique Characters Checker
Unique Characters Checker
Unique Characters Checker
You are given a string s
. Your task is to determine whether the string contains all unique characters when compared in a case-insensitive manner and ignoring spaces.
Formally, let s be a string of length n after removing spaces and converting all letters to lowercase. The string is considered valid if and only if for every two indices \(i\) and \(j\) with \(i \neq j\), the characters satisfy \(s_i \neq s_j\).
If the string is empty or consists of a single non-space character, it is considered valid.
inputFormat
The input consists of a single line containing the string s
. Note that the string may include spaces and a mix of uppercase and lowercase letters.
outputFormat
Output a single line: True
if the string contains all unique characters (ignoring spaces and letter case), or False
otherwise.
abcdefg
True