mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-07 07:35:35 +08:00
面试题 02.07.链表相交 排版格式修复
This commit is contained in:
@ -34,6 +34,7 @@
|
|||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 思路
|
## 思路
|
||||||
|
|
||||||
|
|
||||||
@ -101,7 +102,7 @@ public:
|
|||||||
|
|
||||||
## 其他语言版本
|
## 其他语言版本
|
||||||
|
|
||||||
Java:
|
### Java:
|
||||||
|
|
||||||
```Java
|
```Java
|
||||||
public class Solution {
|
public class Solution {
|
||||||
@ -150,8 +151,7 @@ public class Solution {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Python:
|
||||||
Python:
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
||||||
@ -280,7 +280,7 @@ class Solution:
|
|||||||
return pointerA
|
return pointerA
|
||||||
```
|
```
|
||||||
|
|
||||||
Go:
|
### Go:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
func getIntersectionNode(headA, headB *ListNode) *ListNode {
|
func getIntersectionNode(headA, headB *ListNode) *ListNode {
|
||||||
@ -341,7 +341,7 @@ func getIntersectionNode(headA, headB *ListNode) *ListNode {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
JavaScript:
|
### JavaScript:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var getListLen = function(head) {
|
var getListLen = function(head) {
|
||||||
@ -376,7 +376,7 @@ var getIntersectionNode = function(headA, headB) {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
TypeScript:
|
### TypeScript:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
function getIntersectionNode(headA: ListNode | null, headB: ListNode | null): ListNode | null {
|
function getIntersectionNode(headA: ListNode | null, headB: ListNode | null): ListNode | null {
|
||||||
@ -413,7 +413,7 @@ function getIntersectionNode(headA: ListNode | null, headB: ListNode | null): Li
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
C:
|
### C:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {
|
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {
|
||||||
@ -452,7 +452,7 @@ ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Scala:
|
### Scala:
|
||||||
|
|
||||||
```scala
|
```scala
|
||||||
object Solution {
|
object Solution {
|
||||||
@ -508,3 +508,4 @@ object Solution {
|
|||||||
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
|
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
|
||||||
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
|
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user