Chef_Sister.pdf - Chef loves playing with her sister a lot...

This preview shows page 1 out of 1 page.

Chef loves playing with her sister a lot. Once her sister invented an interesting game. They bough n balloons from the market and arranged them in a line from left to right. You are given the configuration of the baloons by a string s of length n . Now, Chef's sister wants her to burst the balloons using two devices. For the first device, he can selected at most K balloons of same colour and burst them up. For the second device, he can selected at most K balloons all of distinct colours and burst them up. He can use the devices as many times as he wish. Soon, Chef started to find the game boring. So, he wants to finish the game as soon as possible. Find out how many minimum number of times Chef has to use the devices?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture