Linked List1 [Leetcode][Javascript][Easy] 21. Merge Two Sorted Lists /** * https://leetcode.com/problems/merge-two-sorted-lists/ * Definition for singly-linked list. * function ListNode(val, next) { * this.val = (val===undefined ? 0 : val) * this.next = (next===undefined ? null : next) * } */ /** * @param {ListNode} l1 * @param {ListNode} l2 * @return {ListNode} */ var mergeTwoLists = function(l1, l2) { var node = new ListNode(); var firstNode = node; if (l1 === .. 2021. 7. 6. 이전 1 다음