Fair Cut problem hackerrank.

Revision en2, by zephyr_23, 2018-06-05 16:20:11

I am trying to solve this problem ( https://www.hackerrank.com/contests/hourrank-12/challenges/fair-cut ). The editorial describes D.P approach which I am not able to understand. In the discussion, I saw a greedy approach but I am not able to prove why it works.

Can someone please help me in understanding the D.P approach to this question?

Thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English zephyr_23 2018-06-05 16:20:11 2
en1 English zephyr_23 2018-06-05 16:19:09 382 Initial revision (published)