Adobe interview question

Basic data structure and Java questions. Find sub array with max product in an array of integers Implement Producer/Consumer in java

Interview Answer

Anonymous

20 Jul 2017

Maintain 2 variable min product & max product. Iterate array if current_value is negative min_product = max_product * current_value && max_product. = min_product*value vice versa if current_value is positive