Блог пользователя I_lOVE_ROMAN

Автор I_lOVE_ROMAN, история, 2 года назад, По-английски

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.

  • Проголосовать: нравится
  • -24
  • Проголосовать: не нравится