Given a string s of length n, the task is to compute the number of distinct substrings that appear in the string. A substring is defined as a contiguous sequence of characters within the string.
The task is to determine how many unique substrings can be formed from the string.