DevRev Interview Question

they asked me one DP question and 4Sum problem