Number of Valid Partitions

Company: Linkedin_17july

Difficulty: medium