Graphic: Rerouting problem test in python language
问题 Your company has N servers. The information flows from one server to another through a connection. If the information flows from server i to server j , then connection (i) = j. It's possible for some server connection(i) = i, meaning information doesn't flow further. You are given an array connection consisting of N integers. You are tasked with making minimum number of changes to connection array values so that the information from all server can reach at exactly one server in the whole