optimize the algorithm of rotated sorted array with duplication & the topic article