algorithm - Given holidays and leaves how to maximize days in vacations? - Stack Overflow
This is more of an algorithm review :-
Problem : Given the holidays as list of integers, between 0-364, and number of leaves N available, how to maximize the number of days in X vacations, where a vacation is a date range, which encompasses holidays that falls in the range and uses leaves for the rest in the range.
I believe the following pseudo code using getMaxVacations(X, 0, 364, N) might work with some small fixes & optimizations, but I am looking for other approaches to visualize the problem, not necessarily faster.
Read full article from algorithm - Given holidays and leaves how to maximize days in vacations? - Stack Overflow
No comments:
Post a Comment