氟塑料離心泵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 你爸是李剛 閱讀(147) 評論(0)  編輯  收藏


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


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

          導航

          統計

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          技術網站

          行業網站

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          站長網 氟塑料離心泵 注塑機 液晶廣告機
          主站蜘蛛池模板: 海盐县| 普安县| 梁河县| 溧水县| 广东省| 唐海县| 思南县| 东平县| 望奎县| 密山市| 巴楚县| 通辽市| 抚州市| 司法| 炉霍县| 南昌县| 桑日县| 连州市| 玉龙| 北票市| 从化市| 天峻县| 清水县| 青浦区| 若尔盖县| 大田县| 闽侯县| 嘉禾县| 榕江县| 钟山县| 三亚市| 滁州市| 玉林市| 连平县| 樟树市| 玛纳斯县| 郴州市| 论坛| 沅江市| 吴忠市| 恩施市|