• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Icy.warrior
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  Algorithms

【第五天打卡。

摘要:Bag Sample Compute the average and simple standard deviation of the double values on standard input public class Stats { public static void main (Stri 阅读全文
posted @ 2017-08-09 16:33 Icy.warrior 阅读(109) 评论(0) 推荐(0)
【第四天打卡。

摘要:In&Out public class test { public static void main(String[] args) { Out out = new Out(args[args.length - 1]); for (int i = 0; i < args.length - 1; i + 阅读全文
posted @ 2017-08-06 10:21 Icy.warrior 阅读(116) 评论(0) 推荐(0)
【第三天打卡。

摘要:BinarySearch import java.util.Array public class BinarySearch { public static int rank (int key, int[] a) { if (lo > hi) return -1; int lo = 0; int hi 阅读全文
posted @ 2017-08-05 09:57 Icy.warrior 阅读(110) 评论(0) 推荐(0)
第二天打卡。

摘要:random int value drawn from discrete distribution (i with probability a[i]) public static int double(double[] a) { double r = StdRandom.random(); doub 阅读全文
posted @ 2017-08-04 10:56 Icy.warrior 阅读(91) 评论(0) 推荐(0)
【唉

摘要:primality test public static boolean isPrime(int N) { if(N < 2) return false; for(int i = 2; i * i < N; i++) if(N % i == 0) return false; return true; 阅读全文
posted @ 2017-08-03 10:53 Icy.warrior 阅读(194) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3