Company: Arcesium_19dec
Difficulty: medium
Positive Product body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; line-height: 1.6; color: #333; max-width: 800px; margin: 20px auto; padding: 0 20px; } h1, h2, h3 { border-bottom: 1px solid #eee; padding-bottom: 10px; } code { background-color: #f4f4f4; padding: 2px 6px; border-radius: 4px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; } pre { background-color: #f4f4f4; padding: 15px; border-radius: 5px; overflow-x: auto; } strong { font-weight: 600; } ul { padding-left: 20px; } Positive Product You are given a sequence of n integers and you have to find the maximum length of a segment which gives a positive product. Complete the maxLength function in your editor. It has 1 parameter: An array, arr , containing n elements of the sequence. It must return an integer denoting the maximum length of a segment which gives a positive pr