Max Sum Subarray using Kadane's Algo

Can we print the Sub array giving max sum, using Kadane’s Algo ?

Hi raghav
yes, we can keep track of max sum subarray
Maintain two variables start_index and length, tracking the start and length of global_max subarray. Update them if current_max > global_max.

Hope it helps
Mark resolved if satisfied :slight_smile: