Given an array of post nums, find the max dist s.t. having 2 pointers l, r starting at a position, l can only go left and r and only go right and both can only move if next num >= current num.
E.g.
print(maxDist([2, 6, 8, 5]) == 3)
print(maxDist([1, 5, 5, 2, 6]) == 4)print(maxDist([1, 1]) == 2)
print(maxDist([1, 1, 1, 1, 1]) == 5)
print(maxDist([2, 2, 2, 10, 1, 10, 2, 2, 2]) == 4)
print(maxDist([2, 2, 2, 10, 1, 10, 2, 2]) == 4)
print(maxDist([2, 10, 8, 4, 2, 1, 9, 10, 2]) == 7)