Two Subarrays Hackerrank Solution For Sql