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

|
||||
|
||||
|
||||
|
||||
## 思路
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user