Leetcode 1761. Minimum Degree of a Connected Trio in a Graph
Given an undirected graph, find all connected trios (triangles) and compute each trio's degree — the number of edges with one endpoint in the trio and the other outside — then return the minimum such degree or -1 if no trio exists. The core challenge is efficiently enumerating triangles and counting their external edges (n ≤ 400 makes triangle enumeration via adjacency checks feasible).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.