面试题 02.07.链表相交 排版格式修复

This commit is contained in:
jinbudaily
2023-07-18 15:23:24 +08:00
parent a64e11b09a
commit 8eb214c060

View File

@ -34,6 +34,7 @@
![](https://code-thinking-1253855093.file.myqcloud.com/pics/20211219221812.png)![](https://code-thinking-1253855093.file.myqcloud.com/pics/20211219221812.png)
## 思路
@ -101,7 +102,7 @@ public:
## 其他语言版本
Java
### Java
```Java
public class Solution {
@ -150,8 +151,7 @@ public class Solution {
}
```
Python
### Python
```python
@ -280,7 +280,7 @@ class Solution:
return pointerA
```
Go:
### Go:
```go
func getIntersectionNode(headA, headB *ListNode) *ListNode {
@ -341,7 +341,7 @@ func getIntersectionNode(headA, headB *ListNode) *ListNode {
}
```
JavaScript
### JavaScript
```js
var getListLen = function(head) {
@ -376,7 +376,7 @@ var getIntersectionNode = function(headA, headB) {
};
```
TypeScript
### TypeScript
```typescript
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
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {
@ -452,7 +452,7 @@ ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {
}
```
Scala:
### Scala:
```scala
object Solution {
@ -508,3 +508,4 @@ object Solution {
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
</a>