547. Number of Provinces
Medium
Input: isConnected = [[1,1,0],[1,1,0],[0,0,1]]
Output: 2Input: isConnected = [[1,0,0],[0,1,0],[0,0,1]]
Output: 3Last updated
Input: isConnected = [[1,1,0],[1,1,0],[0,0,1]]
Output: 2Input: isConnected = [[1,0,0],[0,1,0],[0,0,1]]
Output: 3Last updated