← ALL NOTES
Backtracking

401. Binary Watch

A binary watch has 4 LEDs for the hour (0–11) and 6 for the minutes (0–59); given how many LEDs are lit, list every time it could show. Each lit LED is a set bit, so "n LEDs on" means popcount(hour)…

Loading…