Amazon Interview Question

int array, such as [3, -4, 8, -10] find consecutive subset, get the maximum sum.