2014年5月8日

摘要: 1.循环 1 public class T009 { 2 public static void main(String[] args){ 3 System.out.println(fibonacci(3)); 4 } 5 public static long ... 阅读全文
posted @ 2014-05-08 15:53 thehappyyouth 阅读(165) 评论(0) 推荐(0) 编辑
 
摘要: 1 public class T008 { 2 public static void main(String[] args) { 3 int[] num = { 3, 4, 5, 1, 2 }; 4 System.out.println(min(num, 5... 阅读全文
posted @ 2014-05-08 15:19 thehappyyouth 阅读(195) 评论(0) 推荐(0) 编辑
 
摘要: 1 import java.util.Stack; 2 3 public class T007 { 4 public static void main(String[] args) { 5 Queue q = new Queue(); 6 q.stack1... 阅读全文
posted @ 2014-05-08 11:17 thehappyyouth 阅读(168) 评论(0) 推荐(0) 编辑
 
摘要: 1.O(nlogk)海量数据 1 import java.util.TreeSet; 2 3 public class T030 { 4 public static void main(String[] args){ 5 int[] data = {4,5,1,6,2,7,... 阅读全文
posted @ 2014-05-08 10:23 thehappyyouth 阅读(247) 评论(0) 推荐(0) 编辑
 
摘要: 1 public class T006 { 2 public static void main(String[] args){ 3 int pre[] = {1,2,4,7,3,5,6,8}; 4 int in[] = {4,7,2,1,5,3,8,6}; ... 阅读全文
posted @ 2014-05-08 09:13 thehappyyouth 阅读(1045) 评论(0) 推荐(0) 编辑