@Override
    public void sort(List<T> list) {
        buildHeap(list);
        for ( int i  = list.size() - 1 ; i > 0 ; i -- ) {
            T target = list.get(i);
            list.set(i, list.get(0));
            list.set(0, target);

            heapfy(list, 0, i);
        }
    }