|
|
back to boardTwo hints may be helpful to this problem 1.The relationship is always mutual,which means that if 1 has a friend 2,then 2 has a friend 1. 2.1 has a friend 2, and 2 has a friend 3 doesn't mean 1 and 3 are friends,thus be careful to use disjoint set. Hope they are helpful to you guys :) |
|
|