Question d’entretien chez Deloitte

subarray coding question with medium difficulty