JAVA_Intersection of Two Linked Lists_LeetCode 160


JAVA_Intersection of Two Linked Lists_LeetCode 160

JAVA_Intersection of Two Linked Lists_LeetCode 160 풀이 public class Solution { public ListNode getIntersectionNode(ListNode headA, ListNode headB) { ListNode nodeA = headA, nodeB = headB; while (nodeA != nodeB) { nodeA = nodeA == null ? headB : nodeA.next; nodeB = nodeB == null ? headA : nodeB.next; } return nodeA; } } * 출처 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...


#IntersectionofTwoLinkedLists_LeetCode160 #JAVA #JAVA_IntersectionofTwoLinkedLists #JAVA_IntersectionofTwoLinkedLists_LeetCode160 #JAVA_LeetCode160

원문링크 : JAVA_Intersection of Two Linked Lists_LeetCode 160