[Solved] Rearrangement of Seats with Java, C++, Python
![[Solved] Rearrangement of Seats with Java, C++, Python [Solved] Rearrangement of Seats with Java, C++, Python](https://realcoder.techss24.com/wp-content/uploads/2023/07/Solved-Rearrangement-of-Seats-with-Java-C-Python-768x432.png)
Rearrangement of Seats: There are N students in a class, sitting on chairs numbered from 1 to N.Initially all the students are seated serially from 1 to N. Their teacher assigns them a task wherein the students are required to…