Meta interview question

Merge 2 arrays using intervals