Incorrect test data and solution


#1

Solution shall fail for the following case

A : [ 0, 1, 2, 3, 3, 3 ]

Whenever there are adjacent equal entries.


#2

Expected answer => [1 2 3 4 4 4] ==> 18

Test Data / Editorial solution ==> [1 2 3 4 1 1] ==> 12


#3

Consider Candy = [ 1 2 3 4 1 1 ], ans = 12 is the correct answer.
Expected answer is also coming correct only.
Screenshot%20from%202019-06-20%2010-03-10