Number of Provinces
Explore how to determine the number of connected provinces from an adjacency matrix of cities. This lesson helps you understand direct and indirect connections, develop an optimal graph traversal approach, and apply it to coding interviews. Gain skills to solve this classic challenge efficiently.
We'll cover the following...
We'll cover the following...
Statement
Given cities, where cities[i][j]