1. 堆排序,时间复杂度O(nlogn),空间复杂度O(1) def solution(A): # write your code in Python (Python 3.6) target = sum(A) / 2 cur = 0 cnt = 0 n = len(A) def shift(i, n): while i * 2 + 1 < n&nbs***bsp;i * 2 + 2 < n: if i * 2 + 2 >= n&nbs***bsp;A[i * 2 + 1...