Is there any number given in the number of swap row?
My interpretation of this question is,
when there are 2 students, 1 swap is needed.
when there are 3 students, 2 swaps are needed. (A-B and then A-C)
when there are 4 students, 2 swaps are needed too. (A-B and C-D)
when there are 5 students, 3 swaps are needed. (A-B, C-D and one of them swap with E)
for even number, the number of swaps needed is N÷2
and for odd number, the number of swaps needed is (N+1)÷2
So, for 25 students , swap needed is (25+1)÷2=13