Bonus Task...basic score != actual score?

Does the basic score in the bonus task that we need to calculate not equal the actual score we get from every merge?

like if I get the following array:
2, 2, 2, 2, 2, ,2
after the first merge, the array would be
4,0,2,2,2,2 $v1 =4, $v0=1
after the second merge, the array would be:
4,0,4,0,2,2 $v1 =4+4 =8, $v0=1+1=2 but according to the project description: $v1= 2^(2-1)*(4+4)=16
after the third merge, the array would be:
4,0,4,0,4,0 $v1 =8+4 =12, $v0=1+1=3 but according to the project description: $v1 = 2^(3-1)*(4+4+4)=48

So is the basic score mentioned in the task not equal to the actual score we got after every merge? Or did I understand it wrongly?

You just have to calculate the “basic” score without the multi score stuff. The calculation with 2^(merges - 1)*base score is already given.
In your example you would return 12 in $v1 and 3 in $v0.
Does that answer your question?

3 Likes

yes, it does. Thanks you so much :slight_smile: