Add new 1-D dp solution