Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
762 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) | 762 views

1 Answer

0 like 0 dislike
Best answer
Sure will put the solution.
by Expert (108,280 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 .