Citadel Interview Question

Minimal equal sum using dp