Count Open Lockers After 100 Rounds

Quick Overview

Solve the 100-locker puzzle by connecting toggle rounds to divisors, explaining why perfect squares remain open and counting the final open lockers.

Count Open Lockers After 100 Rounds

Company: Tekion

Role: Software Engineer

Category: Statistics & Math

Difficulty: medium

Interview Round: Technical Screen

A hallway contains **100 lockers**, numbered 1 through 100. All begin closed. - In round 1, open every locker. - In round 2, close every second locker. - In round 3, toggle every third locker: an open locker closes, and a closed locker opens. - Continue in this way through round 100, toggling every locker whose number is a multiple of the round number. After all 100 rounds, how many lockers are open? Explain why your count follows from the operations rather than relying on a round-by-round simulation. ### What a Strong Answer Covers - Which rounds affect one particular locker. - How the parity of its number of toggles determines its final state. - A counting argument that accounts for all lockers from 1 through 100, including both endpoints. ### Follow-up Questions - Why do most toggle rounds for a given locker occur in pairs, and when does that pairing leave an unpaired round?

Overview: Solve the 100-locker puzzle by connecting toggle rounds to divisors, explaining why perfect squares remain open and counting the final open lockers.

|Home/Statistics & Math/Tekion
Tekion logo
Tekion
Sep 10, 2026
mediumSoftware EngineerTechnical ScreenStatistics & Math
0
0

A hallway contains 100 lockers, numbered 1 through 100. All begin closed.

  • In round 1, open every locker.
  • In round 2, close every second locker.
  • In round 3, toggle every third locker: an open locker closes, and a closed locker opens.
  • Continue in this way through round 100, toggling every locker whose number is a multiple of the round number.

After all 100 rounds, how many lockers are open? Explain why your count follows from the operations rather than relying on a round-by-round simulation.

What a Strong Answer Covers Guidance

  • Which rounds affect one particular locker.
  • How the parity of its number of toggles determines its final state.
  • A counting argument that accounts for all lockers from 1 through 100, including both endpoints.

Follow-up Questions Guidance

  • Why do most toggle rounds for a given locker occur in pairs, and when does that pairing leave an unpaired round?
Loading comments...