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 d772b0e commit 8d100dfCopy full SHA for 8d100df
src/main/java/com/fishercoder/solutions/_160.java
@@ -8,7 +8,10 @@
8
public class _160 {
9
10
public static class Solution1 {
11
-
+ /**
12
+ * Time: O(max(m, n))
13
+ * Space: O(1)
14
+ */
15
public ListNode getIntersectionNode(ListNode headA, ListNode headB) {
16
int lenA = findLen(headA);
17
int lenB = findLen(headB);
@@ -45,7 +48,6 @@ private int findLen(ListNode head) {
45
48
public static class Solution2 {
46
49
/**
47
50
* Most optimal solution:
- * <p>
51
* O(m+n) time
52
* O(1) space
53
* credit: https://discuss.leetcode.com/topic/28067/java-solution-without-knowing-the-difference-in-len
0 commit comments