摘要:
1、复制带随机指针的链表 class Solution(object): def copyRandomList(self, head): """ :type head: Node :rtype: Node """ if head is None: return None p = head while 阅读全文
摘要:
def adjust_deap(arr, p, b): while True: if 2 * p + 1 > b - 1: break elif 2 * p + 2 < b and arr[2 * p + 2] > arr[2 * p + 1] and arr[2 * p + 2] > arr[p]: arr[p], arr[2 * p + 2] = arr[2 * p + 2], arr[p] 阅读全文