← ALL NOTES
Math

2409. Count Days Spent Together

Dates are a disguise here. Both stays are closed intervals, and once each "MM-DD" becomes a day number in [1, 365] the answer is the length of their intersection: the later arrival, the earlier departure, done.

Loading…