Count subarrays equal to target | Meta Interview Question