[SOLVED] Algo Homework 4-Airport Runway Problem

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon HW04-zmeg3p.zip (188.5 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

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

  • HW04-zmeg3p.zip