Kandane Algorithm

public static int maxSubArray(final List A) {
int max_so_far = A.get(0);
int curr_max = A.get(0);

	    for (int i = 1; i < A.size(); i++)
	        curr_max = Math.max(A.get(i), curr_max+A.get(i));
	        max_so_far = Math.max(max_so_far, curr_max);
	    return max_so_far;


Can you please suggest to me a book(s) or a youtube playlist(s) or an online course(s) where I can learn all such kind of algorithms?

Click here to start solving coding interview questions