Deutsche Bank interview question

join menthod explanation