Question bank › Arrays
Dsa Arrays Hard

Max Sum Circular Subarray

Given a circular integer array, find the maximum possible sum of a non-empty subarray. The wrapping of the array should be taken into account. Input: The first line contains an integer N, the size of the array. The second line contains N space-separated integers. Output: Output a single integer, the maximum sum of a subarray. Example: Input: 6 1 -2 3 -2 5 -1 Output: 8

Key concepts

arrayscircular arrayskadane's algorithm

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.