TuSimple interview question

Lane merge question using stack