You are given a meetings where meetings[i] = [start_i, end_i, revenue_i] represents a meeting that starts at start_i, ends at end_i, and generates revenue_i in revenue.
You may choose a subset of meetings to attend such that no two chosen meetings overlap. Two meetings do not overlap if the end time of the earlier meeting is less than or equal to the start time of the later meeting.
If you choose a sequence of meetings sorted in chronological order, your total earnings are calculated as the sum of:
The revenue revenue_i of each chosen meeting.
The idle gap duration between each pair of consecutive chosen meetings, defined as the start time of the subsequent meeting minus the end time of the preceding meeting.
Return the maximum total earnings you can achieve.
Constraints:
meetings.length
meetings[i] = [start_i, end_i, revenue_i]
start_i end_i
revenue_i
You are given a meetings where meetings[i] = [start_i, end_i, revenue_i] represents a meeting that starts at start_i, ends at end_i, and generates revenue_i in revenue.
You may choose a subset of meetings to attend such that no two chosen meetings overlap. Two meetings do not overlap if the end time of the earlier meeting is less than or equal to the start time of the later meeting.
If you choose a sequence of meetings sorted in chronological order, your total earnings are calculated as the sum of:
The revenue revenue_i of each chosen meeting.
The idle gap duration between each pair of consecutive chosen meetings, defined as the start time of the subsequent meeting minus the end time of the preceding meeting.
Return the maximum total earnings you can achieve.
Constraints:
meetings.length
meetings[i] = [start_i, end_i, revenue_i]
start_i end_i
revenue_i