Question: Task 4: Dependency Analysis (7 kt) You are given a text file that has list of dependencies between (any) two projects in the source code

Task 4: Dependency Analysis (7 kt) You are given a text file that has list of dependencies between (any) two projects in the source code repository. Write an algorithm to determine the build order, ie which project needs to be built first, followed by which project based on the dependencies. EX: ProjectDependencies.txt a -> b (means 'a' has a dependency on 'b', so 'b' needs to be built first and then 'a') b->c b->d ->d what should be the right build order for the project? If you are asked to implement an algorithm to perform the automatic build based on the dependency info., how would you design the data structure and the algorithm? Note, only algorithm (and data structure) is needed, do not spend time on writing I/O related code such as how to read a text file line by line, please just focus on the algorithm and data structure. Draw figures if that helps to explain your algorithm Task 4: Dependency Analysis (7 kt) You are given a text file that has list of dependencies between (any) two projects in the source code repository. Write an algorithm to determine the build order, ie which project needs to be built first, followed by which project based on the dependencies. EX: ProjectDependencies.txt a -> b (means 'a' has a dependency on 'b', so 'b' needs to be built first and then 'a') b->c b->d ->d what should be the right build order for the project? If you are asked to implement an algorithm to perform the automatic build based on the dependency info., how would you design the data structure and the algorithm? Note, only algorithm (and data structure) is needed, do not spend time on writing I/O related code such as how to read a text file line by line, please just focus on the algorithm and data structure. Draw figures if that helps to explain your algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
