Can you please fix my code?

User Generated

enzrazna

Programming

Description

I have done the code but it needs to be edited. The method is depth first search in java and I want to change the code that a user can enter a vertex to start, not only from A.

Unformatted Attachment Preview

import java.io.*; import java.util.*; public class DFS { public static void DFS_search_inner(int[][] adjMatrix, int[] visited, int index, int num) { //if have already visited if(visited[index]==1) { return; } else { visited[index]=1; //use for loop to go through all the vertexes for(int i=0; i
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer


Anonymous
Great study resource, helped me a lot.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags