Target interview question

dsa question were asked in interview