2753. Count Houses in a Circular Street II
Hints
Hint 1
First, imagine that there is exactly one open door and try to solve the problem.
Hint 2
Now close an opened door.
Hint 3
Then visit k houses by going right. If there is no open door, your assumption of having exactly one open door was right, and you have the answer.
Hint 4
If there is still an open door, go to step 1.
Preparing judge…