Learn to find the number of connected city groups or provinces from a connectivity matrix using algorithms.