Why are we using left and right array


#1

what is the use of left and right array i dont understand
help plz.
i just know why we using top and bottom array for storing topmost and bottommost position for each element in array for each possible base (parallel to y axis )we have to find the farthest element in row either on left side or right side that is different from the elements selected in base.
but why left and right array?