Company: Palo Alto Networks SDE on campus_16march
Difficulty: medium
You are given an integer array C of N elements where: Positive values (> 0) represent river current flowing to the right. Negative values (< 0) represent river current flowing to the left. Zeros (0) represent stagnant sections. For each stagnant section (0), you have to calculate its net current strength based on adjacent non-zero values. If both adjacent currents exist, the stronger one influences the stagnant section. Your task is to find and return the modified array showing the net current strength at each section. If two or more zeros are adjacent in the current array, the net current strength for those sections should be influenced by the next non-zero currents on either side. Input Specification: input1 : An integer value N, representing the number of sections in the river. input2 : An integer array C, representing the inward (positive) and outward (negative) water flow of each section. Output Specification: Return an integer array representing the net current strength at