Count Unique Characters of All Substrings
Hard📝 Description
Sum counts of unique characters in all substrings
Input Format
String s
Output Format
Sum of counts
Constraints
1 ≤ s.length ≤ 10^5
🔍 Sample Input
"ABC"
✅ Sample Output
10
Code Editor
Please login to run and submit code.
Results
Suggested Solution
Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run