Sponsored
Use these hints if you're stuck. Try solving on your own first.
Close the door of k houses moving in one direction.
Open the door of the current house.
Move in one direction and count until you reach the house with the open door.
Solve with full IDE support and test cases