Answers for "count subarrays whose product is divisible by 4"

1

count subarrays whose product is divisible by 4

How to find number of subarrays whose product is divisible
by 4 in linear time. Sample I/O - if arr[] = {1,4,9} 
then answer should be 4 as {1,4} , {1,4,9} , {4,9} , {4}
have their products divisible by 4
Posted by: Guest on June-16-2020

Browse Popular Code Answers by Language