您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php 双向行列

2024/4/7 6:55:49发布19次查看
php 双向队列
queue,$node); $this->countqueue(); } public function frontremove(){ $node = array_shift($this->queue); $this->countqueue(); return $node; } public function rearadd($node){ array_push($this->queue,$node); $this->countqueue(); } public function rearremove(){ $node = array_pop($this->queue); $this->countqueue(); return $node; } public function countqueue(){ $this->length = count($this->queue); }}$fruit = new deque();echo $fruit -> length;$fruit -> frontadd(apple);$fruit -> rearadd(watermelon);echo '';print_r($fruit);echo '
';?>?
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product