11, the minimum number of rotation of the array

Subject description: the beginning of an array of several elements moved to the end of the array, we call the rotation of the array. A non-descending order of the input array of a rotation of the output rotary smallest element array. For example, an array {3,4,5,1,2} {1,2,3,4,5} is a rotation of the array to a minimum. NOTE: All the elements are given in greater than 0, if the array size is 0, return 0.

Ideas:

Guess you like

Origin www.cnblogs.com/guoyu1/p/12058310.html