[자바스크립트/알고리즘] LeetCode - 정렬된 두 리스트 합치기
[문제] 21. Merge Two Sorted Lists Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists. [예시] Input Output l1 = [1,2,4], l2 = [1,3,4] [1,1,2,3,4,4] l1 = [], l2 = [] [] l1 = [], l2 = [0] [0] [풀이] /** * Definition for singly-linked list. * function ListNode(val, next) { * this.val = (val===undefined ? 0 : val) * th..
2021. 3. 7.