[Solved] Algo Homework 4-Airport Runway Problem

30 $

File Name: Algo_Homework_4-Airport_Runway_Problem.zip
File Size: 357.96 KB

SKU: [Solved] Algo Homework 4-Airport Runway Problem Category: Tag:

Or Upload Your Assignment Here:


You are in charge of building an airport runway scheduling system. Let’s say that today you have 5 landings scheduled at time 37, 41, 46, 49, and 56, but now another airline wants to see if they can schedule landings at time 44, 53, and 20 as well. How could we handle this new request?

We have this new request for landings that need to be checking to see whether it would overlap within k time with another scheduled flight or not. If so, we could not insert it into our schedule. The input file contains several lines, one for each number to be scheduled. Each line contains first integer n, where n is the number of scheduled landings today, follows by the scheduled time for landings, k time to check overlap, and new request time for landings.

Write a program that maintains reservations for set of landings on airport runway scheduling system.

Sample input

5,37,41,46,49,56,3,44,53,20

Sample output

Request at time 44 is not allowed

Request at time 53 is allowed

Request at time 20 is not allowed

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Algo Homework 4-Airport Runway Problem
30 $