Hello, in this problem 1011 — Marriage Ceremoniesthe priority index is not clear to me. I used bottom up manner and calculate the max adjacent values.
5
5 10 10 2 3
2 11 3 10 10
16 12 1 5 2
4 2 11 5 2
1 8 14 4 13
Ans:60.Which for me 14 11 12 11 10
total 58
.What am I missing here? Need help with that.
My code