class Node: def __init__(self, val, next=None) -> None: self.val = val self.next = next class LinkedList: def __init__(self) -> None: self.head = Node(-1) self.size = 0 def insert(self, x, y): pre = self.head cur = pre.next ...