Company: Nk Securities_27oct
Difficulty: medium
Debt Management Relocations Problem Description A company has a list of expected revenues and payments for the upcoming year in chronological order. The problem is that at some moments in time the sum of previous payments is larger than the total of previous revenue. This would put the company in debt. The company wants to completely avoid this negative approach. It reschedules some expenses to the end of the year. You are given an array of integers, where positive numbers represent revenues and negative numbers represent expenses, all in chronological order. On one hand, you can assume that expenses (negative number) to the end of the array. What is the minimum number of such relocations to make sure that the company never falls into debt? In other words: you want to make sure that there is no consecutive sequence of elements starting from the beginning of the array, that sums up to a negative number. You can assume that the sum of all elements in A is nonnegative. Write a function: i