Viasat Interview Question

How do you build a state machine to check for a sequence?