Partitioning binary strings | Applications of Dynamic Programming &

Can someone give a detailed explanation for this problem!