Two Subarrays Hackerrank Solution For Python