Education + Jobs Hiring Website - 2025
0 like 0 dislike
1,558 views
Example

Input

"101101"

Query= [2,3]

Output

for window size 2 :- 10,01,11,10,01 --> 1+1+2+1+1

Sum= 6

for window size 3 :- 101,011,110,101 --> 2+2+2+2

Sum =8

Result =[6,8]
in Online Assessments by (160 points) | 1,558 views

1 Answer

0 like 0 dislike
Best answer
Sure will put the solution.
by Expert (145,060 points)

Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .