In: Computer Science
The airline carriers schedule the flights between pairs of cities through the shortest routes. Two airline carriers are called equivalent if they offer the flights between the same pairs of cities. Design an algorithm with less than cubic time complexity to compare whether two given airline carriers are equivalent or not. Direct and connecting flights are not differentiated here.