Company: Prodapt
Difficulty: medium
Crystal Vault Alex is exploring an ancient treasure vault filled with magical crystals. Each crystal carries an integer value, which may be positive, negative or zero. To unlock the treasure Alex must select a subsequence of the crystals - some of them, kept in their original order - and the vault reacts to the product of the selected values. Alex wants that product to be as large as possible. Given the values of the n crystals in the order they are laid out, report the maximum product obtainable from any non-empty subsequence. A subsequence is formed by deleting zero or more elements without changing the order of the remaining ones. At least one crystal must be selected. Note that the product can be enormous: with 400 crystals of value 10^9 each it has 3601 digits, so it does not fit in a 64-bit integer. Function Description Complete the function maxSubsequenceProduct with the following parameter: int a[n] : the values of the crystals, in order ### Returns the largest product achievab