Deutsche Bank Interview Question

join menthod explanation