Ironman wants to travel from Avengers tower to stark tower. on the way, he has to make stops and rest (he has fought extraterrestrials and is weak). on every stop there is either charging device for his suit or he needs to vanquish a stray alien consuming his power. charging devices increase the suit power and fighting the alien drains it. if any given time his power goes below 1 he dies. given an array of stop with values (positive mean charging places with capacity and negative being the power requires to kill the alien) calculate the minimum power capacity he needs to have before starting the journey in order to safely reach stark tower. write the pseudo code and explain.



