我目前正在学习排序算法,需要实现HeapSort和Introspective Sort。 我觉得我已经实现堆排序成功(代码工作,试图以百万计随机大小进行随机排列的,总是工作),这里是我的代码: public static <T extends Comparable<? super T>> void hsort(T[] a) {
int n = a.length;
if(n <
我遇到了调用不同类中的方法的问题。该方法在其自己的lab14类别中,heapSort()方法位于不同的类别HeapSort中。这两个类都在默认包中。我收到错误“The method heapSort(Vector)is undefined for the Lab14”,我不明白为什么,请帮忙。下面 是在实验室的主要方法14类 public static void main(String args[