Golang | DFS
Code\n\nfunc dfs(curr int, visited []bool, isConnected [][]int) {\n    visited[curr] = true\n    for next := 0; next < len(isConnected); next++ {\n        if is
# Code\n```\nfunc dfs(curr int, visited []bool, isConnected [][]int) {\n    visited[curr] = true\n    for next := 0; next < len(isConnected); next++ {\n        if isConnected[curr][next] == 0 {continue} \n        if !visited[next] {\n            dfs(next, visited, isConnected)\n        }\n    } \n}\n\nfunc findCircleNum(isConnected [][]int) int {\n    var count int = 0\n    visited := make([]bool, len(isConnected))\n    for i := 0; i < len(isConnected); i++ {\n        if !visited[i] {\n            count++\n            dfs(i, visited, isConnected)\n        }\n    }\n    return count\n}\n```
['Depth-First Search', 'Graph', 'Go']