0 day streak
Anonymous · shared experience1 Oct 2025 · 5 views

Rakuten: Traffic light component with a timed cycle

Interview question #Rakuten SDE 1 Machine coding

Problem. Build a traffic signal component in React with TypeScript.

Rules given.

  1. The lights switch every 2 seconds.
  2. After each 6 seconds of switching, pause for 4 seconds, then repeat.
  3. Clicking any light restarts the cycle from that light.

What it tests. Managing timers in effects, cleaning them up, and resetting state on a click without leaking intervals.

Context. First round for an early-career React and Node.js role, followed by rapid-fire resume questions and a small SQL task.

0 comments

Comments 0

No comments yet. Ask the author something, or add what happened in your own round.