标签:list HERE else 描述 包含min函数的栈 head class init des
题目描述
# -*- coding:utf-8 -*- # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # 返回合并后列表 def Merge(self, pHead1, pHead2): # write code here if not pHead1: return pHead2 if not pHead2: return pHead1 if pHead1.val <= pHead2.val: pHead1.next = self.Merge(pHead1.next,pHead2) return pHead1 else: pHead2.next = self.Merge(pHead1,pHead2.next) return pHead2
标签:list HERE else 描述 包含min函数的栈 head class init des
原文地址:https://www.cnblogs.com/ansang/p/12000939.html