Problem 2274 · Medium

Maximum Consecutive Floors Without Special Floors

Sort the special floors, add sentinels just outside the range, and take the widest gap between neighbouring marks.

Open the interactive visualisation