AMD interview question

How to build a fsm sequence detector