数据结构和算法(转载) 原文地址: https://blog.csdn.net/s1070/article/details/51174725 1.使对象可以像数组一样进行foreach循环,要求属性必须是私有。(Iterator模式的PHP5实现,写一类实现Iterator接口)(腾讯) <?php Read More
posted @ 2018-06-05 15:13
_Eternity味道
Views(249)
Comments(0)
Diggs(0)
算法 Read More
posted @ 2018-06-05 14:15
_Eternity味道
Views(105)
Comments(0)
Diggs(0)
/* 递归调用实现二分法查找 //$search 函数 $array为数组,$K为要找的值,$low为查找范围的最小键值,$high为查找范围的最大键值 //intval返回整数值*/ function search($array,$k,$low=0,$high=0){ //判断数组元素的数量 if(count($array)!=0 and $high==0){ ... Read More
posted @ 2018-06-05 11:23
_Eternity味道
Views(683)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号