OURS Technology interview question

Sequence detector