Search
⌘K

Leetcode 1583. Count Unhappy Friends

Given n friends with complete preference lists and a fixed pairing, count how many people are "unhappy" because there exists another person they prefer over their current partner who also prefers them over their own partner — i.e., detect mutual-preference instability in the matching.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.