DevRev interview question

they asked me one DP question and 4Sum problem