NVIDIA interview question

State machine to detect a signal