Dsa
Strings
Medium
Count Unique Character Substrings
Given a string `s`, write a program to determine how many unique substrings exist within that string. A substring is defined as a contiguous sequence of characters within a string. The substrings should be counted without regard to case (e.g., 'abc' and 'ABC' are considered the same). The output should be the count of unique substrings.
### Input Format:
- A single line containing the string `s` (1 <= |s| <= 1000).
### Output Format:
- A single integer representing the count of unique substrings.
### Example:
Input:
abc
Output:
6
Explanation: The unique substrings are: 'a', 'b', 'c', 'ab', 'bc', 'abc'.
Key concepts
stringssubstringscounting
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now