My issue
Kindly help to understand in simple language, could not able to understand
Learning course: Basic Math using Python
Problem Link: CodeChef: Practical coding for everyone
Kindly help to understand in simple language, could not able to understand
Learning course: Basic Math using Python
Problem Link: CodeChef: Practical coding for everyone
@airelaxingstor
U have to find the binary strings such that it contains minimum number of ones and it will satisfy the condition that maximum of s[i] and s[i+1] will be 1 which means either s[i] or s[i+1] must be 1.
Correct Answer(s):
0101
1010
01010
Explanation:
We observe that 010101... will always be optimal.