Please answer the question

what is the key idea of this problem?

@Anku47 refer this
(https://www.geeksforgeeks.org/puzzle-76-toggling-prison-cell/)
dont forget to hit like and mark resolved if cleared :smiley: