Question in O(N)

Правка en1, от rahul_1234, 2016-07-07 15:46:57

Hi, I wanted to solve this question in O(N) but couldn't think of it. I did it in O(N logN ) using priority queue but can somebody provide me O(N) solution. https://www.codechef.com/DI16R003/problems/DFSORD

Теги o(n)

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en9 Английский rahul_1234 2016-07-07 16:32:25 0 (published)
en8 Английский rahul_1234 2016-07-07 16:28:06 0 (saved to drafts)
en7 Английский rahul_1234 2016-07-07 16:27:30 11
en6 Английский rahul_1234 2016-07-07 16:03:50 2 Tiny change: '1iexg13/\nThe link' -> '1iexg13/\n\nThe link'
en5 Английский rahul_1234 2016-07-07 16:03:35 58
en4 Английский rahul_1234 2016-07-07 16:00:51 84
en3 Английский rahul_1234 2016-07-07 15:58:58 67
en2 Английский rahul_1234 2016-07-07 15:47:20 2 Tiny change: 'olution.\nhttps://' -> 'olution.\n\nhttps://'
en1 Английский rahul_1234 2016-07-07 15:46:57 227 Initial revision (published)