CommScope interview question

Sorting write code for it and show