Pergunta de entrevista da empresa Google

Find string subsequences of length k that do not contain the same characters.