What is the approach to solve this problem, I tried to view this code
But I didn’t understand what logic he is using.
How the maximum possible teams could be = ((no. of players with no choice)/2)+1;
I mean, when petr tries to fill the choice of the players who have not filled the choice, he may get head every time so he will leave all those choices as it is, so answer could be equal to n if no player has filled the choice.