Algorithm · Airbnb · Medium
You are building a scheduling tool for a vacation rental website. You have a list of n rental properties, indexed from 0 to n - 1. Each property has a set of dates when it is available for booking. A user wants to reserve a continuous block of dates starting at start and ending at end (both inclusive). Your task is to find every possible way to cover every day in that interval, using one of the following approaches: A single rental: one property alone can accommodate all…
Checking your access…