Google interview question

A dp question on partition problem