← Amazon questions

FSM for divisibility by 3

Filed under Amazon

Given an incoming stream of numbers (0, 1, or 2), design a Finite State Machine (FSM) that indicates whether the number formed by the input stream so far is divisible by 3.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.