How to convert an iterative function that checks for cycles in an adjacency matrix, to a simpler, recursive function in C?
问题 Having trouble grasping recursive thinking, and a lot of what I've seen on Stack overflow so far I don't understand. I'm trying to detect a cycle in a directed graph, given a 2D array adjacency matrix where a value of true for graph[i][j] indicates an edge from i to j. Have created a check_cycles function which checks for a path from j to i, given graph[i][j] and have hard coded the size of the graph to simplify the issue. I am getting a return value of true as expected with this code, but as