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

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

I have read the editorial but yet not cleared enough about the approach. Can anyone provide me some hints? How to approach this problem? I just need to know about the observation that how you will approach the problem to solve it.

Problem

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

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Do you know the technique of marking ranges on an array? You use the indices of the array as the bounds of the ranges and put +1 to the left bound and -1 to the index one position of the right bound.

You have to do the same, just use a map to do it.