Distinctness

A substring of string S is another string S’ which occurs in str...

Sofdor Ali and Bracket Sequence

Sofdor Ali has invented a new game. He asked his assistant Jong ...

Smallest Subarray

You are given an array A of N integers A1, A2, A3, …, AN . If we...

Unique Substrings Query

You will be given a string s of length n. Consider substring s[...