Apple Interview Question

Use Join to solve question