Question: Problem statement Send feedback You are given a string ' S ' of length ' N ' and an integer ' K ' . '

Problem statement
Send feedback
You are given a string 'S' of length 'N' and an integer 'K'.'K' is a divisor of 'N'.
Suppose you break the string into 'M' subarrays (where 'M'='N'/'K'), i.e.,
The first substring 'S1' is 'S[1... KJ'.
The second substring 'S2' is 'S[K +1...2*KJ'.
The 'M'th substring is 'SM' is 'S[(M-1)* K +1... M* KJ'.
You are allowed to do the following operation:
Choose any index 'i' of the string 'S'.
Replace it with any lowercasecharacter.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!