Skip to content

Commit

Permalink
Update tideman.c
Browse files Browse the repository at this point in the history
  • Loading branch information
akuazzam authored Oct 25, 2020
1 parent a0751c3 commit ea14b56
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tideman.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,11 @@ bool iscyclic () {
bool iscyclic_recur (int src) {
if (visited[src]) return true;
visited[src] = true;
bool ans = false;
for (int i = 0; i < candidate_count; i ++) {
if (locked[src][i]) ans = ans || iscyclic_recur(i);
if (locked[src][i] && iscyclic_recur(i)) return true;
}

return ans;
return false;
}

//help method for testing. not used in solution
Expand Down

0 comments on commit ea14b56

Please sign in to comment.