LTIMindtree Technical OA | | Peak Consecutive Sum Challenge | 2025(September)

Question · Posted Jun 2026

Question: Maximum Subarray Problem Statement Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Input Format The first line contains T - the number of test cases. For each testcase, the first line contains N. The second line contains N space-separated integers. Output Format For each test case, print the maximum subarray sum on a new line. Constraints 1 <= T <= 100 1 <= N ...

The full answer & interview discussion are available to premium members.

Log in Create a free account