面试题 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) ![](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 ```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>