Maximum Vacation Days with Limited PTO
Given a calendar represented as a string of working days (W) and holidays (H), and a limited number of PTO days, find the maximum consecutive vacation days possible by optimally placing your PTO days. Return the maximum number of consecutive days you can be on vacation.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid October, 2025
Meta
Senior
Given a calendar with working days and holidays and defined number of vacations/PTO you can take. Find how can you plan your PTO so that you get maximum number of days as vacation, and return maximun number of vacation days I/P -
PTO - 3
W H W H W W W H H H Output - 7 variation of 1004. Max Consecutive Ones III
Hello Interview Premium
Your account is free and you can post anonymously if you choose.