会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
thehappyyouth
2014年5月8日
java实现——009Fibonacci数列
摘要: 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
阅读(171)
评论(0)
推荐(0)
java实现——008旋转数组的最小数字
摘要: 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
阅读(198)
评论(0)
推荐(0)
java实现——007用两个栈实现队列
摘要: 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
阅读(174)
评论(0)
推荐(0)
java实现——030最小的k个数
摘要: 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
阅读(263)
评论(0)
推荐(0)
java实现——006重建二叉树
摘要: 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
阅读(1049)
评论(0)
推荐(0)
公告
导航
博客园
首页
新随笔
新文章
联系
订阅
管理