NVIDIA interview question

FSM to detect sequence