from typing import List class Solve: def heapsort(array:List[int]): def _heapify(arr:List[int],n,i): left=2*i+1 right=