[Candy problem] What if a child has the same rating value with his neighbor.


  • 0
    L

    For example, if the input is: [1, 2, 3, 3, 1]
    Which is the answer? 9 or 8?


  • 0
    K

    I have the same question, actually in this case it makes the trending count much more difficult if you are considering the wave (peak / bottom) layout.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.