Company: Ion Group_24july
Difficulty: medium
Count Delayed Flights Problem Description A network of flights contains flight_nodes number of flights denoted by [1, 2, ..., flight_nodes] . There is a list of dependencies among flights denoted by the arrays flight_from[] , flight_to[] . Each pair (flight_from[i], flight_to[i]) denotes that flight_from[i] depends on flight_to[i] and must depart only after flight_to[i] has landed. If a flight is delayed, all the flights dependent on this flight and their corresponding dependencies are also delayed. Given a list of k initially delayed flights and the network as described, find the list of all delayed flights. Return the list sorted in increasing order of flight numbers. Function Description Complete the function countDelayedFlights in the editor below. countDelayedFlights has the following parameters: int flight_nodes : the number of flights int flight_from[m] : the details of the flight dependencies (source flight) int flight_to[m] : the details of the flight dependencies (target flig