Question:
http://www.lintcode.com/en/problem/maximum-subarray/
Given an array of integers, find a contiguous subarray which has the largest sum.
Time Complexity: O(n)
Answer:
void maxsumofsubarray(int* array, int len) {
int curMax = 0;
int mi = -1;
int mj = -1;
int max;
bool max_init = false;
for (int