Cisco interview question

Sort with unsorted Array A and B