HashiCorp Associate Developer Interview Question 2023 August | Graphs and Union Find | on-campus

Question · Posted Jun 2026

Question 1: Number of Provinces Problem Statement There are n cities. Some of them are connected, while some are not. If city a is connected directly with city b, and city b is connected directly with city c, then city a is connected indirectly with city c. A province is a group of directly or indirectly connected cities and no other cities outside of the group. You are given an n x n matrix isConnected where isConnected[i][j] = 1 if ...

The full answer & interview discussion are available to premium members.

Log in Create a free account