Description
Solutions
Submission
Flights 🚁

In the tale of two interconnected destinations served by flights, travelers aim to complete round trips between them. Flights in one direction take 100 minutes, and return flights take the same duration. Their goal is to determine the moment they'll finish their final round trip, assuming they always board the earliest available flight.

To aid in their journey, the function "tDeskFlights" requires three inputs: two arrays of departure times (one for outbound flights and one for return flights) and the number of round trips planned. It then returns the time in minutes when the last round trip concludes.

For original prompt, pls refer to source image ౨ৎ

Example 1:

Input:  c2d = [0, 200, 500], d2c = [99, 210, 450], journies = 1
Output: 310
Explanation:
Your journey begins as you depart from C to D at minute 0, arriving at D at 100. Shortly after, you return from D to C on the earliest available flight, departing D at 210. Thus, you reach C at 310, marking the conclusion of your journey.
Constraints:
    Unknown for now
Thumbnail 0
Thumbnail 1
Testcase

Result
Case 1

input:

output: