AlgoMaster Logo

Number of Provinces

isConnected=[[1,1,0],[1,1,0],[0,0,1]]
0 / 10
isConnected Matrix012011011102001City Connections012Union-Find StructureLegend:StandardCheckingActiveConnected
algomaster.io
Step:Given 3 cities with connection matrix. Find the number of provinces.