
[Leetcode] 21. Merge Two Sorted Lists + 그림 풀이
·
BE/algorithm
문제: Merge Two Sorted Lists관련 토픽: LinkedList, Recursion난이도: Easy 링크 https://leetcode.com/problems/merge-two-sorted-lists요구사항list1, list2 LinkedList를 정렬된 하나의 LinkedList로 합치기 list1, list2는 정렬된 LinkedList return 값의 list는 두 리스트를 기반으로 만든 값이어야 함 조건LinkedList의 노드 길이는 [0, 50]-100 list1, list2는 오름차순 정렬 (non-decreasing) 풀이이미 정렬된 리스트들을 하나로 합치기 위해서는 brute-forcing, LinkedList, recursion을 사용할 수 도 있음 여기에서는 Lin..