leetcode765专题

LeetCode765. Couples Holding Hands——并查集

文章目录 一、题目二、题解 一、题目 There are n couples sitting in 2n seats arranged in a row and want to hold hands. The people and seats are represented by an integer array row where row[i] is the ID of t