1. function mergeTwoLists(l1, l2) {
    2. if(l1 === null) {
    3. return l2
    4. }
    5. if(l2 === null) {
    6. return l1
    7. }
    8. if(l1.val <= l2.val) {
    9. l1.next = mergeTwoLists(l1.next, l2)
    10. return l1
    11. } else {
    12. l2.next = mergeTwoLists(l2.next, l1)
    13. return l2
    14. }
    15. }

    image.png