Peloton Interactive interview question

Find all subarray with certain properties.