Escape Plan

Hey, you are stuck on prison and you have to get out soon. This prison has one way road and you can only escape on this way. It has N doors numbered 1 to N from prison cell and there is a guard on each door. However, each guard will go on a vacation, and after spending his vacation he will be back. One guard will go on vacation for only one time. To escape from the prison, you have to pass all the door and if any guard on any door is not on vacation on a day, you can’t pass that door on that day. To pass a door you need one day and you can’t wait while you passing doors.

This is a companion discussion topic for the original entry at