Delayed Flights

Company: ION Group_3nov

Difficulty: medium

Problem Statement

Delayed Flights Problem Description A network of flights contains flight_nodes flights, numbered by 1 to flight_nodes . There is a list of dependencies among flights denoted by the array flight_from , flight_to . Each pair flight_from[i] , flight_to[i] means that flight_to[i] depends on flight_from[i] and must wait for flight_from[i] if flight_from[i] is delayed. If flight_from[i] is delayed, all its dependent flights are also delayed. Given a list of k initially delayed flights and the network as described, find the list of all delayed flights. The list must be sorted in increasing order of flight numbers. Complete the function countDelayedFlights in the editor below. countDelayedFlights has the following parameters: int flight_nodes : The number of nodes in the network. vector<int> flight_from : An array of integers representing the source flights of dependencies. vector<int> flight_to : An array of integers representing the destination flights of dependencies. vector<