All challenges
Code AnalysisBeginner 60s

Snowflake clock rollback

The generator crashes or emits bad IDs. Why?
Starter code
id = (now_ms - EPOCH) << 22 | worker_id << 12 | seq++
# NTP shifts now_ms backwards

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle