Target interview question

The questions were from data structures and previous work