Question: Let X = {x 1 , x 2 , . . ., x n } be a sequence of numbers. Design an algorithm that finds
Let X = {x1, x2, . . ., xn} be a sequence of
numbers. Design an algorithm that finds (in linear time) the continuous subsequence of elements xi, xi+1, . . . xj such that their product is the maximum. Suppose the product of an empty subsequence is 1 and observe how values can be lower than 0 and 1.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
