suppose array length n sort ascending order rotate 1 n time for example array num 0144567 become4567014 rotate 4 times0144567 rotate 7 timesnotice rotate array a0 a1 a2 an1 1 time result array an1 a0 a1 a2 an2given sort rotate array num contain duplicate return minimum element arrayyou decrease overall operation step possible example 1input num 135output 1example 2input num 22201output 0 Constraintsn numslength1 n 50005000 numsi 5000nums sort rotate 1 n time follow this problem similar Find Minimum Rotated Sorted Array num contain duplicate would affect runtime complexity how