Skip to content

Booking with Highest Profit #55

Description

@riyasyash

Description

You are listing your house on Airbnb. There are a bunch of booking requests. Each request is represented as an integer array with a length of 2. The first element is the start date, the second element is the end date. Select booking requests wisely so that you can obtain maximum profit without a conflict of schedule. You can assume every day's price is the same.

Sample Input:

[[1,2], [4,5], [7,7]]
Sample Output:

5
Sample Input-2:

[[4,5], [7,9], [1,100]]
Sample Output-2:

100

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions