UiPath Interview Question

1. Problem similar to finding the most frequent element 2. Variation of Kadane's algorithm