NVIDIA Interview Question

Draw and implement a pattern detector for 11001.