Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f563b57

Browse files
edit 21
1 parent 1189ffc commit f563b57

File tree

1 file changed

+5
-2
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+5
-2
lines changed

src/main/java/com/fishercoder/solutions/_21.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
import com.fishercoder.common.classes.ListNode;
44

5-
/**Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.*/
5+
/**
6+
* 21. Merge Two Sorted Lists
7+
* Merge two sorted linked lists and return it as a new list.
8+
* The new list should be made by splicing together the nodes of the first two lists.*/
9+
610
public class _21 {
711

8-
//credit: https://discuss.leetcode.com/topic/45002/java-1-ms-4-lines-codes-using-recursion
912
public ListNode mergeTwoLists(ListNode l1, ListNode l2) {
1013
if (l1 == null) return l2;
1114
if (l2 == null) return l1;

0 commit comments

Comments
 (0)