This is a verified interview question from Uidai. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Maximum Signal Amplification" covers key patterns like DP.
"You are analyzing a digital signal represented by an integer array nums, where each element corresponds to the amplification factor of a signal segment. However, some segments may weaken the signal (represented by negative numbers), and others may completely block it (represented by zeros). Your task is to identify the contiguous segment of the signal (subarray) that produces the maximum amplification when all its amplification factors are multiplied together. To achieve this, you must find the contiguous subarry within nums that has the largest product. ### Function Description You need to implement the function maxSignal. The function should take an integer array nums and return the largest product of any contiguous subarry within it. ### Parameters * nums (List[int]): A list of integers where nums[i] represents the i-th signal segment's amplification factor. ### Return * An integer representing the largest product of any contiguous subarry within the array."
Join thousands of developers practicing for Uidai.