Tekion SDE OA 2024 | Toggling Doors & String Interleaving
Tekion · Question · Posted Jun 2026
Problem 1 - Toggling Doors in an Alley Problem Statement Consider an alley containing N doors, all initially closed. You perform N passes over the doors: On the 1st pass, toggle every door. On the 2nd pass, toggle every 2nd door. On the 3rd pass, toggle every 3rd door. Continue this process until the N-th pass, where you toggle every N-th door. Toggling means opening a closed door or closing an open door. After all N passes are completed, determine ...
The full answer & interview discussion are available to premium members.
Log in Create a free account