We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1189ffc commit f563b57Copy full SHA for f563b57
src/main/java/com/fishercoder/solutions/_21.java
@@ -2,10 +2,13 @@
2
3
import com.fishercoder.common.classes.ListNode;
4
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.*/
+/**
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
+
10
public class _21 {
11
- //credit: https://discuss.leetcode.com/topic/45002/java-1-ms-4-lines-codes-using-recursion
12
public ListNode mergeTwoLists(ListNode l1, ListNode l2) {
13
if (l1 == null) return l2;
14
if (l2 == null) return l1;
0 commit comments