we n building number 0 n 1 each building number employee its transfer season employee want change building reside inyou give array request requestsi fromi toi represent employee request transfer build fromi building toiall building list request achievable building net change employee transfer zero this mean number employee leave equal number employee move for example n 3 employee leave build 0 leave build 1 leave build 2 employee moving build 0 employee move build 1 employee move build 2return maximum number achievable request Example 1input n 5 request 011001122034output 5explantion Lets requestsfrom build 0 employee x y want build 1from build 1 employee b want building 2 0 respectivelyFrom build 2 employee z want build 0from build 3 employee c want build 4from building 4 do not requestsWe achieve request user x b swap placesWe achieve request user y z swap place 3 buildingsexample 2input n 3 request 001221output 3explantion Lets requestsfrom building 0 employee x want stay build 0from build 1 employee y want build 2From build 2 employee z want build 1we achieve request Example 3input n 4 request 03311220output 4 constraints1 n 201 requestslength 16requestsilength 20 fromi toi n