The problem is summing pieces : https://www.hackerrank.com/contests/world-codesprint-7/challenges/summing-pieces
I wasted my whole day understanding the recurrence relation , still I am not able to understand it . Kindly help me with the solution .
Thanks