I_lOVE_ROMAN's blog

By I_lOVE_ROMAN, history, 2 years ago, In English

We have an array which is produced from a sorted array by right shifting array elements some number of times.

Like [4,5,6,1,2,3] is produced from [1,2,3,4,5,6] by right shifting the sorted array 3 times.

The sorted array is always increasing.

If the given array cannot be produced from any increasingly sorted array the answer is no, otherwise answer is yes.

  • Vote: I like it
  • -24
  • Vote: I do not like it