From 513707ca713b2b199f8202e953b1a8dd2c40d447 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Sun, 30 Apr 2023 14:24:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=BE=E8=A1=A8=E7=9B=B8=E4=BA=A4=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E7=BB=93=E6=9E=84=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/面试题02.07.链表相交.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/problems/面试题02.07.链表相交.md b/problems/面试题02.07.链表相交.md index 30f5c467..9e0c29f5 100644 --- a/problems/面试题02.07.链表相交.md +++ b/problems/面试题02.07.链表相交.md @@ -101,8 +101,8 @@ public: ## 其他语言版本 +Java: -### Java ```Java public class Solution { public ListNode getIntersectionNode(ListNode headA, ListNode headB) { @@ -150,9 +150,9 @@ public class Solution { } ``` -### Python -```python +Python: +```python class Solution: def getIntersectionNode(self, headA: ListNode, headB: ListNode) -> ListNode: lenA, lenB = 0, 0 @@ -179,7 +179,7 @@ class Solution: return None ``` -### Go +Go: ```go func getIntersectionNode(headA, headB *ListNode) *ListNode { @@ -240,7 +240,7 @@ func getIntersectionNode(headA, headB *ListNode) *ListNode { } ``` -### javaScript +JavaScript: ```js var getListLen = function(head) { @@ -352,6 +352,7 @@ ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { ``` Scala: + ```scala object Solution { def getIntersectionNode(headA: ListNode, headB: ListNode): ListNode = {