An Interview Question: O(n) Algorithm to Find Abs(Max Left – Max Right)

Given an array of numbers (for simplicity, we use integers), find the maximum value of abs(max left – max right) where we separate the array into two. Mathematically, given …