Question d’entretien chez Peloton Interactive

Find all subarray with certain properties.