# class ListNode: # def __init__(self, x): # self.val = x # self.next = None # # 用双指针,一个指向开头,一个指向结尾,从开头遍历到结尾,如果当前值比x大,则放到链表尾部,否则继续移动 # @param head ListNode类 # @param x int整型 # @return ListNode类 # class Solution: def partition(self , head , x ): # write code here if head==None or head.next==None: ret...