There are a total of n classes labeled with the English alphabet (A, B, C, and so on). Some classes are dependent on other classes for compilation. For example, if class B extends class A, then B has a dependency on A. Therefore, A must be compiled before B.
Given a list of the dependency pairs, find the order in which the classes should be compiled.
Constraints:
dependencies.length ≤676dependencies[i].length =There are a total of n classes labeled with the English alphabet (A, B, C, and so on). Some classes are dependent on other classes for compilation. For example, if class B extends class A, then B has a dependency on A. Therefore, A must be compiled before B.
Given a list of the dependency pairs, find the order in which the classes should be compiled.
Constraints:
dependencies.length ≤676dependencies[i].length =