Maximum element in initially increasing and then decreasing array