SpaceX Interview Question

Detecting patterns in integer arrays