TuSimple Interview Question

Lane merge question using stack