Smallest Diverse String

Company: Salesforce_28thjuly

Difficulty: medium