Row-1 Row-2 Row-3 Row-4
Case1 Class 1 Class 2 Class 1 Class 2
Case2 Class 2 Class 1 Class 2 Class 1
Required seating arrangement can be done in two ways case 1 and case 2.
Total number of arrangements =Number of arrangements in case 1 +Number of arrangements in case 2
Now, 12 students of class1 can be seated in 12 chairs in 12P12 ways and 12 students of a class 2 can be seated
in 12 chairs in 12P12 ways.
Hence, the total number of arrangements
=(12!×12!)+(12!×12!)
(since 12P12=12!)
=2(12!)2