Pergunta de entrevista da empresa Licious

Parantheses balancing and unique elements in a window of k