氟塑料離心泵www.buybeng.com

          jquery教程http://www.software8.co/wzjs/jquery/

          Java版 冒泡,插入,選擇排序

          public final static void swap(int a[],int i,int j){ 
                  int temp = a[i]; 
                  a[i] = a[j]; 
                  a[j] = temp; 
              } 
              public static void bubbleSort(int a[]){ 
                  bubbleSort(a,0,a.length); 
              } 
              public static void bubbleSort(int a[],int low,int high){ 
                  for(int i = high; --i > low;){ 
                      for(int j = low; ++j <= i; ){ 
                          if(a[j]>a[j-1]){ 
                              swap(a,j,j-1); 
                          } 
                      } 
                  } 
              } 
              public static void insertSort(int a[]){ 
                  insertSort(a,0,a.length); 
              } 
              public static void insertSort(int a[],int low,int high){ 
                  for(int i = low; ++i < high; ){   
                      int j = i,key = a[i]; 
                      while( --j >= low&&a[j]<key){              
                          a[j+1]=a[j];                 
                      }    
                      a[j+1] = key;            
                  } 
              } 
              public static void selectSort(int a[],int low,int high){ 
                  for(int i = high;--i>low;){ 
                      int max = i; 
                      for(int j = i;--j>=low;){ 
                          if(a[j]>a[max])max=j; 
                      } 
                      swap(a,max,i); 
                  } 
              } 
              public static void selectSort(int a[]){ 
                  selectSort(a,0,a.length); 
              } 
          個人網站  www.software8.co

          posted on 2012-09-29 17:58 你爸是李剛 閱讀(145) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2012年9月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          30123456

          導航

          統計

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          技術網站

          行業網站

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          站長網 氟塑料離心泵 注塑機 液晶廣告機
          主站蜘蛛池模板: 昌吉市| 广丰县| 利津县| 胶南市| 吉木乃县| 明水县| 含山县| 景谷| 麟游县| 确山县| 宝鸡市| 望江县| 灵山县| 滦南县| 宜宾市| 永靖县| 余江县| 冕宁县| 灵山县| 杂多县| 平顺县| 祁门县| 濉溪县| 宁安市| 太康县| 诸暨市| 修水县| 新巴尔虎右旗| 乌海市| 昌黎县| 铁力市| 尉犁县| 乌恰县| 威宁| 永昌县| 石嘴山市| 内乡县| 安徽省| 阿坝县| 鹤岗市| 封开县|