IONOS Interview Question

Given two array and order time according to array's elements