Check if subarray with given product exists in an array
Given an array of both positive and negative integers and a number K., The task is to check if any subarray with product K is present in the array or not. Examples: Input: arr[] = {-2, -1, 3, -4, 5}, K = 2Output: YESInput: arr[] = {3, -1, -1, -1, 5}, K = 3Output: YESApproach: The code provided seeks