php栈的数据结构
摘要:<?php class Stack{ const MAXSIZE = 4;// 栈最大容量 private $top = -1; private $stack = array();// 利用数组存储数据 public function __construct(){ $this->stack = ar
阅读全文
posted @
2023-03-21 17:39
kevin_yang123
阅读(10)
推荐(0) 编辑
php快速排序和冒泡排序
摘要:<?php function maopao($arr){ if(!is_array($arr)){ return $arr; } $count=count($arr); if($count<=1){ return $arr; } for($i=1;$i<$count;$i++){ for($j=1;
阅读全文
posted @
2023-03-07 15:16
kevin_yang123
阅读(11)
推荐(0) 编辑