Finding the Most Popular Person by Gender Using Floyd-Warshall Algorithm

Problem Analysis Given N people with known gender (F for female, M for male), each person provides direct distance measurements to their friends. The distance between any two people is the minimum possible distance through any path of known relationships. For each person i, define their "opposite-gender distance" as the maximum value ...

Posted on Tue, 12 May 2026 20:41:56 +0000 by Salkcin