Question: Exercise 1 in DES or BFS java code (either DFS or BFS algorithms) provided in class, please do the following: 1. Update the code or

 Exercise 1 in DES or BFS java code (either DFS or

Exercise 1 in DES or BFS java code (either DFS or BFS algorithms) provided in class, please do the following: 1. Update the code or the algorithm to add fill each node with a color. The source/origin node is blue color. All children of a specific node must be filled with alternate color (meaning if a 1st child node has a blue color, then 2nd child node has a yellow, then 3d child node has a blue color, and so on). The master child start with color blue. 2. Add a method that check if a given graph of nodes fulfils the color property defined in question 1. 3. Determine the order of the updated code or algorithm of question 1 and the order of added method in question 2. You can use pseudo code or java code to answer the questions. But if you want to test your work, please use the code so that you can test your work. Exercise 1 in DES or BFS java code (either DFS or BFS algorithms) provided in class, please do the following: 1. Update the code or the algorithm to add fill each node with a color. The source/origin node is blue color. All children of a specific node must be filled with alternate color (meaning if a 1st child node has a blue color, then 2nd child node has a yellow, then 3d child node has a blue color, and so on). The master child start with color blue. 2. Add a method that check if a given graph of nodes fulfils the color property defined in question 1. 3. Determine the order of the updated code or algorithm of question 1 and the order of added method in question 2. You can use pseudo code or java code to answer the questions. But if you want to test your work, please use the code so that you can test your work

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!