solulubeta
Sign in
DSA Basics / Exam level
03.17 · Problem

Shifts with Exactly k Night Duties

Hard Counting windows · at most k minus at most k−1 Pro

This problem is part of solulu Pro

A duty roster lists each day's duty as a number; odd numbers are night duties. The manager wants to know how many continuous stretches of days contain exactly k night duties.

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 82 of 90 · updated 2026-10-12