Find pivot of sorted array