In order to launch an application, we load smaller modules.These modules usually have dependencies on other modules.
Print the order in which the application should load the modules given the dependency list between the modules.
Let's say there are 4 modules to be loaded A, B, C & D
A -> B, C, E
B -> C, D
C → D
Assume you have these two functions available
List<String> getModulesList() - Returns the list of modules to be loaded //[A, B, C, D]
List<String> getDependencyList(String moduleName) - Returns the list of modules on which this module is depedent on
Hi All, do you think we need to use graphs to solve this or map+priority queue would also work?