Wanting a solution of a very easy problem?

Правка en1, от I_lOVE_ROMAN, 2022-01-15 14:39:09

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.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский I_lOVE_ROMAN 2022-01-15 14:39:09 409 Initial revision (published)