




Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Calculate the prefix hashing array for s.
Use the prefix hashing array to calculate the hashing value of each substring.
Compare the hashing values to determine the unique substrings.
There could be collisions if you use hashing, what about double hashing.