Pregunta de entrevista de eBay

How would you write the code find the subsequence with the maximum sum of n integers?

Respuesta de la entrevista

Anónimo

23 ene 2012

int curSum = 0; int totalSum = 0; for (int i=0; i totalSum) { totalSum = curSum; } } return totalSum;

1