mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 00:43:04 +08:00
链表相交文档结构格式化
This commit is contained in:
@ -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 = {
|
||||
|
Reference in New Issue
Block a user