This question evaluates a candidate's skills in string processing, character frequency analysis, and handling character-encoding edge cases such as case sensitivity, Unicode normalization, and grapheme clusters.
Given a string s, return the index of the first character that appears exactly once; if none exists, return -1. Assume s may include both lowercase and uppercase English letters. Clarify whether the check is case-sensitive and implement both case-sensitive and case-insensitive variants. Follow-ups: (