Recursion
-
[linked list] merge two sorted listsAlgorithm/LeetCode 2025. 2. 22. 14:44
✅ Problemhttps://leetcode.com/problems/merge-two-sorted-lists/description/ ✅ Approach & Solution방식1) while문 사용더보기정답 연결리스트에 대한 head, tail 역할 포인터 생성첫 노드 연결에 대한 null 처리를 하지 않도록 하기 위해 dummyNode 생성함/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } * ListNode(int val, ListNode next)..