Google Onsite Round
Anonymous User
2060

Given a string s. Find triplets i,j,k (i<=j<k) such that s[i..j] and s[j+1..k] have same count of distinct characters.

Ex:- abccab

abc, cab is one triplets as {a,b,c} = {a,b,c}.

Note:- ababab
here ab ,abab is also one of the answer.
Count of distinct char not actual count of char has to be same.

Comments (9)