日期:2014-05-20  浏览次数:20653 次

我的程序怎么错了,给指点一下
public   void   selectionSort()   throws   Exception
{       queue   theQ=new   queue(4);
                int   a=0;
               
    for   (int   mark=0;   mark <used-1;   mark++)
                  {
                              int   minIndex   =   findMin(mark);
                        swap(mark,   minIndex);
                            theQ.append(a++);
                            counterA=theQ.serve()+1;
                                  }
         
                System.out.println(counterD+ "     "+counterB+ "   "+counterC+ "   "+counterA);
                  }
             
            private   int   findMin(int   mark)
          {         queue   theQ1=new   queue(4);
                 
                  int   b=0;
                  int   d=0;
                        int   posmin=mark;
                  try{     for   (int   i=posmin+1;   i <used;   i++)
                          if(theList[i] <theList[posmin])
                            {     posmin=i;
                     
                                theQ1.append(b++);
                                counterB=theQ1.serve()+1;
                        }
                          theQ1.append(d++);
                          counterD=theQ1.serve()+1;
                        }
                              catch(Exception   e){};
                              return   posmin;
                }
                public   void   insertionSort()   throws   Exception