冒泡排序,迈开跑路第一步

数据结构跑路篇——冒泡排序 1、原理分析:顾名思义,就是一次循环像冒泡一样,两两比较,最小的浮上来或者最大的沉下去;分析外层控制次数为n次,内层控制剩余比较次数为n-(i+1)次;图片示意: 1.外层为n次 2.内层为剩余循环次数,所以应该从0开始,运行次数为n-(i+1)2、代码展示:#include<stdio.h> void bubble(int *arr,int length){ int i,j 阅读详情
#include<iostream>
#include<string>
using namespace std;
int main() {
	int arr[] = { 7,8,6,3,2,4,8,6,5,1 };
	int len = sizeof(arr) / sizeof(arr[0]);
	int temp = 0;
	for (int i = 0; i < len-1; i++) {
		for (int j = 0; j < len-i-1; j++) {
			if (arr[j] > arr[j + 1]) {
				temp = arr[j];
				arr[j] = arr[j+1];
				arr[j+1] = temp;
			}
		}
	}
	for (int i = 0; i < len; i++) {
		cout << arr[i] << endl;
	}
	system("pause");
	return 0;
}
挣脱枷锁:网页禁止复制/F12失效/右键失灵时的破局之道 大家在网上冲浪的否遇到过这种情况?急需网页上的一段关键信息、一段优美的文字、一个重要的代码片段,或者只是想收藏某篇文章,却发现:文本选择被阻止,右键菜单被禁用,开发者工具(F12)被屏蔽,查看源代码(Ctrl+U)失效?本文会有力解决这些封锁。 阅读详情

相关推荐

解锁RK3588视觉潜能:RGA硬件加速库实战指南

本文深入探讨了如何利用RK3588芯片内置的RGA硬件加速库,解决视觉应用中图像预处理的性能瓶颈。通过实战指南,详细介绍了RGA库在YUV转RGB、图像缩放等核心操作上的应用,相比CPU软处理可大幅降低延迟与CPU占用,从而充分释放RK3588的NPU算力,构建高效的AI视觉预处理流水线。

zeta9的博客 669

javascript从入门到跑路-----小文的js学习笔记目录

** javascript从入门到跑路-----小文的js学习笔记(1)---------script、alert、document。write() 和 console.log 标签

qq_45948983的博客 6848

SPMI协议学习总结

SPMI(System Power Management Interface)是由MIPI(Mobile Industry Processor Interface)联盟定义的一种硬件接口标准,它主要用于移动设备中,连接SoC(System on Chip)处理器系统的集成电源控制器与一个或多个电源管理IC(PMIC),以实现精确的电源管理

歌颂苦难的行为是无耻的; 1078

外包干了3年,跑路了。。。

最近这几天有点忧伤,因为带我的师傅要跑路了,嗯,应该说已经跑路了,他是制药专业的,已经在这个公司干了3年了。其实今年9月份的时候他就跟我说他要跑路了,然后我说,要不你在熬段时间,现在不太好找工作。

HUA6911的博客 1033

【100%通过率】华为od机试C卷【特殊的加密算法】Python 实现

有一种特殊的加密算法,明文为一段数字串,经过密码本查找转换,生成另一段密文数字串。规则如下1.明文为一段数字串由0-9组成2.密码本为数字0-9组成的二维数组3.需要按明文串的数字顺序在密码本里找到同样的数字串,密码本里的数字串是由相邻的单元格数字组成,上下和左右是相邻的,注意:对角线不相邻,同一个单元格的数字不能重复使用。

MISAYAONE的博客 5924

SAP-ABAP:SAP中的用户确认对话框:深入理解与实践POPUP_TO_CONFIRM

本文深入介绍了SAP中的用户确认对话框函数POPUP_TO_CONFIRM,包括其核心参数配置、返回值处理、应用场景和最佳实践。该函数是SAP二次开发中重要的交互工具,用于关键操作前获取用户确认,防止误操作。文章详细解析了参数设置技巧,强调必须全面处理所有可能的返回值,并提供了删除数据、批量操作等典型应用场景的代码示例。同时对比了其他类似弹出函数,帮助开发者选择合适工具。正确使用该函数可提升系统安全性、改善用户体验并符合SAP设计规范。

baidu_35680696的博客 970

javascript从入门到跑路-----小文的js学习笔记(10)------数组(一维数组、二维数组以及三维数组)和冒泡排序

** javascript从入门到跑路-----小文的js学习笔记(1)---------script、alert、document。write() 和 console.log 标签 … … javascript从入门到跑路-----小文的js学习笔记目录 ** 含义: 使用单独的变量名来存储一系列的值。一般用来存放内容。 一、一维数组 两种创建数组的语法: 1、构造函数的形式: new Ar...

qq_45948983的博客 1494

DA14531-外设驱动篇-UART收发通信应用

宏定义注解CFG_PRINTF用户开启串口串口打印宏设置波特率选择115200。

hejinwu1314的博客 729

排序总结(跑路人笔记)

排序总结

qq_61434711的博客 260

2026年1至9月武汉市房地产价格深度分析报告

本报告基于2026年1月至9月武汉市实际成交案例,从成交价格、区域分布、户型结构、价格走势等维度进行深度分析。数据来源包括武汉市住房保障和房屋管理局备案数据、主要中介机构成交记录及典型楼盘网签案例,覆盖全市15个行政区及主要功能板块。

王国平的博客 327

YOLOv8改进,YOLOv8添加DCNv4可变性卷积(windows系统成功编译),全网最详细教程

DCNv4通过两项关键增强解决了其前身DCNv3的局限性:1. 移除空间聚合中的softmax归一化,以增强其动态特性和表达能力;2. 优化内存访问以最小化冗余操作,从而加速计算。这些改进使得DCNv4相比DCNv3显著加快了收敛速度,并且处理速度大幅提升,前向传播速度超过三倍。

在职AI算法工程师,擅长计算机视觉,YOLO目标检测、分割等,擅长web、pyqt界面可视化,好内容持续更新中,来这里跟大家一起学习,共同进步 6469

指针进阶(三) (跑路人笔记)

对指针部分小知识和例子进行了补充

qq_61434711的博客 902

# YOLOv11改进系列 | 引入仓库自研C3k2_EIEM模块,Sobel边缘分支增强检测细节表达

文章摘要: YOLOv11-seg改进中提出的C3k2_EIEM模块通过引入边缘信息增强机制,显著提升了模型对轮廓和纹理的感知能力。该模块在保持原有C3k2结构的基础上,创新性地结合了Sobel边缘检测分支与常规卷积分支的双路特征融合。核心改进包括:(1)固定Sobel算子提供稳定的梯度响应;(2)并行处理边缘与纹理特征;(3)通过1x1卷积实现特征融合。实验显示,改进后模型参数量增加14.16%,计算量提升12.5%,但显著增强了在复杂边界场景下的分割精度。这种设计特别适用于需要精细轮廓识别的任务,如商品

qq_44224801的博客 95

刚入职,就想跑路了...

刚入职一家公司,想离职又怕找不到新工作。

自动化软件测试 1891

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

mysql 排序 删除_排序算法 - mysql从删库到跑路 - 博客园

1 //冒泡排序2 public static function getSort($arr=array()){3 //var_dump($arr);4 //echo "";5 $num = count($arr);//计算数组长度、即排序的循环次数6 //双层循环7 for($i=1;$i19 //快速排序 QuickSort...

weixin_34208400的博客 359

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

时间空间复杂度的计算(跑路人笔记)

时间空间复杂度的计算和事例讲解

qq_61434711的博客 945

算法实验室-28-加油跑路问题[贪心算法]

贪心算法本质 一句话概括就是局部最优 最经典的例子就是冒泡排序: 我总是希望选中“最大的值”沉入到数组的底部 每一次,就是一个局部最优的过程 for(int i =0;i<arrs.length;i++){ int select = arrs[i]; for(int j = i+1;j<arrs.length;j++){ //局部最优 if(arrs[j]&

qq_37080133的博客 215

按名次对数据进行排序cpp_十大经典排序算法

最近在工作中偶然间涉及到数据库的存储和访问,数据库里存放着员工的指纹、年龄以及姓名等信息,当然指纹是通过md5加密存储的。目前需要对员工的年龄、学历、工作年限等进行排序,如果只有几十个上百个样本,应该不会那么麻烦;关键这是几万名员工的数据,这个量很大,马虎不得。悄悄的告诉你,别惹我,我懂得删库跑路哦。脑海中对排序的记忆有点模糊,只对「归并排序」印象较为深刻,为了加深理解,重拾「数据结构与算法」,并...

weixin_39814925的博客 716

IOS--C 语言 Lesson 函数的返回值

一 函数返回值 1.函数返回值类型 函数名 (参数); 函数:能完成特定功能的代码段 函数的声明注意:函数定义在主函数之前,函数的声明可以省略 函数定义在主函数之后,必须要写函数的声明 为了规范,我们在使用函数的要加上函数的声明 2.函数类型 分为四种 1⃣无返回值 无参数; 2⃣无返回值 有参数; 3⃣有返回值 无参数; 4⃣有返回值 有参数; //无返回

Oriannai的博客 797

十大经典排序算法详解

最近在学习中偶然间涉及到数据库的存储和访问,数据库里存放着员工的指纹、年龄以及姓名等信息,当然指纹是通过md5加密存储的。目前需要对员工的年龄、学历、工作年限等进行排序,如果只有几十个上百个样本,应该不会那么麻烦;关键这是几万名员工的数据,这个量很大,马虎不得。悄悄的告诉你,别惹我,我懂得删库跑路哦。 脑海中对排序的记忆有点模糊,只对「归并排序」印象较为深刻,为了加深理解,重拾「数据结构与算法」,并总结了一下常用的十大经典排序算法,由于平台为linux,因此代码全部用C++实现,全部源码均在linux下编译

weixin_45848418的博客 1362

std中稳定排序算法_十大经典排序算法

最近在工作中偶然间涉及到数据库的存储和访问,数据库里存放着员工的指纹、年龄以及姓名等信息,当然指纹是通过md5加密存储的。目前需要对员工的年龄、学历、工作年限等进行排序,如果只有几十个上百个样本,应该不会那么麻烦;关键这是几万名员工的数据,这个量很大,马虎不得。悄悄的告诉你,别惹我,我懂得删库跑路哦。脑海中对排序的记忆有点模糊,只对「归并排序」印象较为深刻,为了加深理解,重拾「数据结构与算法」,并...

weixin_42312227的博客 354

主流排序思路实现和哈希表(Java)

今天我们来聊一聊数据结构里面的排序,我和大家说的方式会和大众的一点不同,我喜欢把他们分类,通过进阶的方式来一步一步的全部展现排序的方法。我们就先带大家知道一下主流的排序方法有什么,1.直接插入排序。2.希尔排序。3.选择排序。4.堆排序。5.冒泡排序。6.快速排序。7.归并排序。

star050913的博客 1056

第四篇2023.2.16

流水账

m0_55779287的博客 87

阿里面经

一面: 1.为什么用spring boot 和 mybaits? 2.AOP的实现原理? 动态代理 代理分 静态代理和动态代理。 静态代理,一个接口,一个实现类,一个代理类,代理类中需要传入实现类。那么此时代理类,可以直接调用代理类的方法,进行功能增强。 优点:实现简单,容易理解 缺点:每个接口,都需要新建实现类和代理类,如果对接口进行了修改或增加,那每个实现类和代理类都需要修改。 动态代理:可以避免上述缺点 在程序执行过程中,使用jdk的反射机制,创建代理类对象(商家),并动态的指定代

ych_ych918的博客 143

个人测试面经

首先,他们是在传输层的协议。 UDP是多对多连接,它的头部只有源端口号和目的端口号,接下来就是数据包了。并且没有网络拥塞机制,很容易掉包。应用场景:直播,实时游戏,物联网。 TCP是一对一连接,它的头部有:源端口号,目的端口号,包的序号,确认序号,校验码,状态位,窗口大小。

weixin_43300561的博客 748

独立开发者系列(13)——示例理解面向对象与过程

面向对象与过程的实例解析

大梁来了的博客 1081

21个令程序员泪流满面的瞬间

来自:程序员最幽默程序员这个职业,说的牛逼点,软件开发工程师,改变这个世界,就像我之前写的那篇文章那样:这些人正在改变这个世界!。说的诙谐点,就是码农,经常加班,周末大部分程序员都是宅在...

飞哥的Python学习笔记 286
上一篇: 基于深度学习的三维点云分割综述
下一篇: C++面经每日一更
打工人呜呜
博客等级 码龄7年 153粉丝 83原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值