2014年3月6日
摘要: 1 ArrayList list=new ArrayList(); 2 for(int i=1;i<8;i++) 3 list.add(i); 4 final int which=8; 5 int countNum=0; 6 int index=0; 7 8 while(list.isEmpty()==false) 9 {10 countNum=countNum+1; //计数用的11 ... 阅读全文
posted @ 2014-03-06 18:31 wf110 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1 private static void qsort_asc(int source[],int low,int high) 2 { 3 if(lowsource[i])17 i++;18 if(isource[low])15 low++;16 if(low<high)17 source[high]=source[low];18 }19 ... 阅读全文
posted @ 2014-03-06 14:17 wf110 阅读(606) 评论(0) 推荐(0) 编辑
摘要: 1 Scanner cin = new Scanner(new BufferedInputStream(System.in));2 int a;3 while (cin.hasNextInt())4 {5 a = cin.nextInt();6 System.out.print(a+" ");7 } 阅读全文
posted @ 2014-03-06 14:14 wf110 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 1 private static void DFS(Deque in,Stack stack,Deque out) { 2 if(0==in.size()) //输入队列空了 3 { 4 if(0==stack.size()) //栈也空了 输出结果 5 { 6 for(Object obj:out.toArray()) 7 System.out.print(obj); 8 ... 阅读全文
posted @ 2014-03-06 10:15 wf110 阅读(1298) 评论(0) 推荐(0) 编辑