
数据结构、算法
阿毛哥
这个作者很懒,什么都没留下…
展开
-
数三退一问题---php
class kid { public $left; public $right; public $id; function __construct($f) { $this->id=$f; } } $num;$first;$last; function circle ($m,$n) { $num=$m; for原创 2013-06-24 22:22:07 · 600 阅读 · 0 评论 -
数三退一问题---java
public class a1{ public static void main(String args []){ Circle c = new Circle (500); Kid k=c.first; System.out.println(k.getid()) ; while(c.first!=c.last){ k = k.right.right; c.q原创 2013-06-24 22:28:39 · 775 阅读 · 0 评论 -
数三退一问题---java布尔数组解决
public class a3 { public static void main(String [] args){ boolean [] S ; S = new boolean [500]; for (int i=0;i S[i] = true ; int s = S.length; int count = 0; int i = 0; while (s>1原创 2013-06-24 22:33:32 · 1693 阅读 · 0 评论