Help me for a sorting problem

Правка en1, от sky_light, 2017-08-06 14:05:17

The problem is you have an array size N with N (1<=N<=1000) , ai and reorder array to have the amount of a[i]<a[i+1] is maximum

example:

Test 1: Input: 5 2 4 1 3 5 Output: 4

(now you sort it is 1 2 3 4 5)

Test 2: Input: 6 1 1 3 4 2 2 Output: 4

(now you sort it is 1 2 3 4 1 2)

Теги sorting

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский sky_light 2017-08-06 14:09:36 47
en2 Английский sky_light 2017-08-06 14:05:58 4 (published)
en1 Английский sky_light 2017-08-06 14:05:17 351 Initial revision (saved to drafts)