mirror of
https://github.com/chefyuan/algorithm-base.git
synced 2025-08-03 22:41:58 +00:00
验证,校对
This commit is contained in:
@@ -131,12 +131,7 @@ var partition = function(head, x) {
|
||||
|
||||
Python Code:
|
||||
|
||||
```py
|
||||
# Definition for singly-linked list.
|
||||
# class ListNode:
|
||||
# def __init__(self, val=0, next=None):
|
||||
# self.val = val
|
||||
# self.next = next
|
||||
```python
|
||||
class Solution:
|
||||
def partition(self, head: ListNode, x: int) -> ListNode:
|
||||
pro = head
|
||||
@@ -161,3 +156,4 @@ class Solution:
|
||||
small.next = headbig.next
|
||||
return headsmall.next
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user