摘要:
题目描述: 方法一:排序输出中位数 class Solution(object): def majorityElement(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return None nums.sor 阅读全文
摘要:
题目描述: 解法一:迭代 class Solution: def reverseList(self, head: ListNode) -> ListNode: pre = None cur = head while cur: tmp = cur.next cur.next = pre cur,pre 阅读全文