前些时候做过的一份面试试题[3]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 keminlau 的 blog

                                      if (ai[i] > ai[i+1])  swap(ref ai[i], ref ai[i+1]);

                   }

         }

         static void swap(ref int x,ref int y) {

                   x = x + y;

                   y = x - y;

                   x = x - y;

         }

         static void main(string[] args) {

                   int[] ai = getdata();

                   bubblesort(ai);

                   foreach (int i in ai) console.writeline(i);

本文关键:前些时候做过的一份面试试题
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top