Let’s say I want to detect the pattern “PARTY”.
First State: waiting for ‘P’.If I got P, I go to second State.Second State: got ‘P’.
Now...(Here’s my question)If I got A..I’ll go to third state.If not...I’ll have two options..if I got ‘P’.. I’ll go back to second State. If not, I’ll go back to first state.
Is this how it is supposed to be done?
First State: waiting for ‘P’.If I got P, I go to second State.Second State: got ‘P’.
Now...(Here’s my question)If I got A..I’ll go to third state.If not...I’ll have two options..if I got ‘P’.. I’ll go back to second State. If not, I’ll go back to first state.
Is this how it is supposed to be done?