GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing leetcode-in-java.github.io — LeetCode-in-Java LeetCode-in-Java547. Number of ProvincesMedium There are A province is a group of directly or indirectly connected cities and no other cities outside of the group. You are given an Return the total number of provinces. Example 1:
Input: isConnected = [[1,1,0],[1,1,0],[0,0,1]] Output: 2 Example 2:
Input: isConnected = [[1,0,0],[0,1,0],[0,0,1]] Output: 3 Constraints:
Solution
This site is open source. Improve this page.
|
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |