← Amazon questions

DFA design to accept streams with odd 'A's and even 'B's

Filed under Amazon

Construct a Deterministic Finite Automaton (DFA) that processes a stream of 'A' and 'B' characters and outputs 1 whenever the cumulative count of 'A's seen so far is odd and the count of 'B's is even…

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.