Good or bad persons doubt (GOODBAD)

Hey guys i have a doubt in this question

for this test case:
N=6 K=4
CAnsAs

Here he can make all small letters and output the answer as “chef” or he can make it as all capital letters and output the answer as “brother” .Here which output is satisfied for this condition.

Based on a quick reading, the output should be

both

I think.

yeah agree but K is 4 only and first 3 flips are used for making it all small letters and then K=1 one flip cant be used to make all capital letters .K should be 6 to make the output “both”

No, the question is about who could have sent it.

It could have been sent by chef, because that would need only 3 capital letters to be made lowercase, and 3 \le K.

Likewise, it could have been sent by brother, as that would only need 3 lowercase letters to be made uppercase, and again 3 \le K.

So it could have been sent by either chef or brother i.e. the possible sender is both.

1 Like

In here K remains same it will not change based on how many flips he does.