Algorithm · Expedia · Hard
Problem Statement You are given an n x n binary matrix relationships that encodes direct connections between n languages. A 1 at relationships[i][j] means language i and language j are directly related. Since the matrix may not be symmetric, treat two languages as directly related if either relationships[i][j] == 1 or relationships[j][i] == 1. A group is a set of languages in which every pair has a direct relationship (i.e., the group forms a clique in the undirected graph…
Checking your access…