please give me a dp solution for this problem i solved it using two pointers but struggling to form dp solution (i am new to dp so learning dp );
please give me a dp solution for this problem i solved it using two pointers but struggling to form dp solution (i am new to dp so learning dp );