Samsung Electronics Interview Question

Design a sequence detector