-
Leetcode - 21. Merge Two sorted List알고리즘/알고리즘 문제 복기 2021. 2. 13. 12:19
leetcode.com/problems/merge-two-sorted-lists/
Merge Two Sorted Lists - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
Answer
새로운 리스트를 만들고 두개의 리스트의 값을 비교해 값을 순차적으로 집어넣는 과정을 거쳤다.
다음과 같이 재귀함수로도 쓸 수 있다.
'알고리즘 > 알고리즘 문제 복기' 카테고리의 다른 글
LeetCode - 70. Climbing Stairs (0) 2021.02.14 LeetCode - 53. Maximum SubArray (0) 2021.02.13 Leetcode - 20. Vaild Parentheses (0) 2021.02.13 Leetcode - 17. Letter Combination of a Phone Number (0) 2021.02.13 Leetcode - 15. 3Sum (0) 2021.02.13