摘要: deleteNode('30');(非平衡树可删除,平衡树的没写删除操作) print_r($tree->getTree()); ?>bstOrder.phpdata = $data; $this->left = $left; $this->... 阅读全文
posted @ 2011-11-20 17:20 黑暗遊侠 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 1. $a = '333'; $c = &$a; $d = '888'; $c = &$d; echo $c; echo $a; 2. $a = '333'; $c = &$a; $d = '888'; $c = $d; echo $c; echo $a; 其中第四行$c = $d和$c = &$d 阅读全文
posted @ 2011-11-17 11:15 黑暗遊侠 阅读(76) 评论(0) 推荐(0) 编辑
摘要: '10', 'af'=>'11', 'gb'=>'16', 'fg'=>'17', 'bc'=>'18', 'bi'=>'12', 'ci'=>'8', 'cd'=>'22', 'di'=>'21', 'dg'=>'24', 'gh& 阅读全文
posted @ 2011-11-05 21:18 黑暗遊侠 阅读(159) 评论(0) 推荐(0) 编辑
摘要: '10', 'af'=>'11', 'bg'=>'16', 'fg'=>'17', 'bc'=>'18', 'bi'=>'12', 'ci'=>'8', 'cd'=>'22', 'di'=>'21', 'dg'=>'24', 'gh& 阅读全文
posted @ 2011-11-02 18:35 黑暗遊侠 阅读(454) 评论(0) 推荐(0) 编辑
摘要: '3', 'ac'=>'4', 'be'=>'6', 'bd'=>'5', 'cd'=>'8', 'cf'=>'7', 'de'=>'3', 'eg'=>'9', 'eh'=>'4', 'fh'=>'6', 'gj'=> 阅读全文
posted @ 2011-11-02 18:30 黑暗遊侠 阅读(204) 评论(0) 推荐(0) 编辑
摘要: createThreadTree(); echo $tree->threadList() . "\n";从第一个结点开始遍历线索二叉树 echo $tree->threadListReserv();从最后一个结点开始反向遍历?>biTree.phpdata = $data; ... 阅读全文
posted @ 2011-10-26 19:56 黑暗遊侠 阅读(400) 评论(0) 推荐(0) 编辑
摘要: str = str_split($str); $this->next = array(); } //返回主串的长度 public function getStrCount(){ return count($... 阅读全文
posted @ 2011-10-23 12:32 黑暗遊侠 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1.如果有多个变量名指向某一个变量值,unset任何一个变量名只是断开变量名和变量值之间的关系,不会释放内存,该值还存在 (例外见2). 2.两种情况会释放内存,否则内存中该变量值还存在. a)该变量值占用空间超过256字节的时候用unset()才会释放内存(这是有人的测试结果,待解释) b)当指向 阅读全文
posted @ 2011-10-21 14:58 黑暗遊侠 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 1.function test($arr){} echo test(&$arr); 2.function test(&$arr){} echo test($arr); 1和2是一样的效果. 3.function &test($arr){return $result;} echo &test($a); 阅读全文
posted @ 2011-10-21 14:56 黑暗遊侠 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1.在插入数据时两者的意义基本一样.区别只在于addslashes 在magic_quotes_sybase=on时将“ '”转换成“ ' '” 在magic_quotes_sybase=off时将“ '”转换成“\ '” 而mysql_escape_string总是将“ '”转换成“\ '” 2. 阅读全文
posted @ 2011-10-21 14:47 黑暗遊侠 阅读(220) 评论(0) 推荐(0) 编辑