Google Interview Question

A dp question on partition problem