Infosys Hiring HackWithInfy 2026 | Maximum Product Subarray | Palindrome Pairs Variant
Infosys · Question · Posted Jun 2026
Question1: Maximum Product Subarray Problem Statement Given an array of N integers, find the contiguous subarray (containing at least one element) that has the largest product and return that product. A subarray is a contiguous part of an array. Input Format First line contains an integer N, the size of the array. Second line contains N space-separated integers representing the array elements. Output Format Print the maximum product of any contiguous subarray. Constraints 1 ≤ N ≤ 10^5 -10 ≤ ...
The full answer & interview discussion are available to premium members.
Log in Create a free account