Minimum Number of Substrings

Company: De Shaw_3july_b

Difficulty: medium