Pergunta de entrevista da empresa Microsoft

Given a string and a number k return the maximum substring which has no more than k unique digits.