选择排序: 数据较少时可以用,缺点:时间复杂度n的平方,优点:空间复杂度小 具体实现: /** * 选择排序 * * @param $array * @return mixed */ public function sort($array) { $len = count($array); if ($ ...
分类:
编程语言 时间:
2021-07-12 18:06:27
阅读次数:
0
快速排序: 总体最优,数据大时性能最好 具体实现:设置一个基准值,小于基准值放左边,大于基准值放右边,最后递归继续排左右两侧的,最后排完后合并 /** * 快速排序 * * @param $array * @return array */ public function sort($array): ...
分类:
编程语言 时间:
2021-07-12 18:06:10
阅读次数:
0
冒泡排序: 数据少时可以用,简单,稳定 具体实现: /** * @param $array * @return mixed */ public function sort($array) { $len = count($array); if ($len 1) { return $array; } / ...
分类:
编程语言 时间:
2021-07-12 18:05:32
阅读次数:
0
2021年7月10日22:44:49 trait zx { // const sss = 9; public static function tt() { echo 'tt'; } public function yy() { echo 'yy'; } } class uu { use zx; co ...
分类:
Web程序 时间:
2021-07-12 17:56:00
阅读次数:
0
cobra框架使用手册 cobra是go语言的一个库,可以用于编写命令行工具。 概念 Cobra 结构由三部分组成:命令 (commands)、参数 (arguments)、标志 (flags)。最好的应用程序在使用时读起来像句子,要遵循的模式是APPNAME VERB NOUN --ADJECTI ...
分类:
其他好文 时间:
2021-07-07 17:55:53
阅读次数:
0
一、简介 基于matlab GUI音乐时钟设计 二、源代码 function varargout = untitled(varargin) % UNTITLED M-file for untitled.fig % UNTITLED, by itself, creates a new UNTITLED ...
分类:
其他好文 时间:
2021-07-07 17:48:53
阅读次数:
0
function dms2mod(markers_dms_file, model_file, image_file) %%%%% Convert Dynamo markers (.dms files) into IMOD format model files (.mod) %%%%% Require ...
分类:
其他好文 时间:
2021-07-05 18:56:14
阅读次数:
0
接口定义 interface 关键字定义的类就叫接口 接口实例 <?php //接口定义 interface Human{ //跑步 public function run(); //跳远 public function jump(); } //接口实现 class Person implement ...
分类:
Web程序 时间:
2021-07-05 18:53:37
阅读次数:
0
<template> <div> <el-table :data="xpList" border style="width: 100%" height="500" > <el-table-column prop="" label="序号" :formatter="nShowIndex" width= ...
分类:
其他好文 时间:
2021-07-05 18:48:52
阅读次数:
0
1)select下拉框控制div的隐藏与显示 script> function checkYear() { var selectValue = $("select[name='periodType']").val(); if(selectValue == 1){ $("#isPeriodYearHa ...
分类:
Web程序 时间:
2021-07-05 18:15:19
阅读次数:
0