Search
⌘K

Leetcode 2409. Count Days Spent Together

Given two inclusive date ranges in the same non-leap year (dates as "MM-DD") for Alice and Bob, return the number of days they are in the city together. A common approach is to convert dates to day-of-year and take the overlap length between max(arrival dates) and min(leave dates) (or 0 if no overlap).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.