solulubeta
Sign in
DSA Basics / Building up
02.17 · Problem

The Best Stretch of Trading Days

Medium Running best (Kadane) Pro

This problem is part of solulu Pro

A small trader notes his profit or loss each day — a loss is a negative number. He wants to know the best continuous stretch of days he could point to: the stretch whose profits add up to the most.

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 47 of 90 · updated 2026-10-12