AMD interview question

C++, array and queue modeling, fsm for pattern detection