本文同样以FAQ的形式记录算法及相关知识的学习过程。
Q:有哪些比较全面的总结?
Q:如何计算时间复杂度?大O定义怎么回事?
A:百度百科,大O表示法;实例,二分搜索的时间复杂度O(logN)如何得到;
Q:查找匹配字符串时,有什么方法?
A:直接匹配(易懂,易实现);kmp(难懂,不好实现);正则表达式(快捷方便);
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
200+累计阅读
261平均单平台
已同步平台
优快云
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄17年
本文同样以FAQ的形式记录算法及相关知识的学习过程。
Q:有哪些比较全面的总结?
Q:如何计算时间复杂度?大O定义怎么回事?
A:百度百科,大O表示法;实例,二分搜索的时间复杂度O(logN)如何得到;
Q:查找匹配字符串时,有什么方法?
A:直接匹配(易懂,易实现);kmp(难懂,不好实现);正则表达式(快捷方便);
手把手教你用LTspice仿真TVS二极管:从选型验证到波形分析全流程
本文详细介绍了如何使用LTspice仿真TVS二极管,从选型验证到波形分析的全流程。通过搭建仿真环境、核心参数验证和系统级防护策略,帮助工程师低成本评估TVS性能,优化电路设计。特别适用于电源设计和接口防护领域,提升工作效率和设计准确性。
[C++] 算法学习笔记汇总(一、数学相关及一些较为基础的知识)
6球不同盒同可空 :枚举盒子的个数DP[n][i]7球不同盒不同可空 每一个球都有m种选择。
开关电源PCB安规设计避坑指南:从光耦开槽到变压器挡墙,这些细节决定认证成败
本文深入解析开关电源PCB安规设计中的关键细节,包括光耦开槽、变压器挡墙工艺等12个致命要点。通过实际案例和工艺参数表,揭示如何避免认证失败,特别强调爬电距离和电气间隙的精确控制,助力工程师提升产品安全性和认证通过率。
DQN相关知识总结及演员-评论员算法介绍(DataWhale组队学习笔记)
DQN深度Q网络相关知识,以及演员-评论员算法的简单解释
滤波器初步入门(非常全面)
主要关注的是-3dB这个点,-3dB就是截止频率所对应的点,我们把功率降至50%以下的信号定义为被衰减掉了(但要跟实际情况相结合,有些信号衰减-3db不够,需要衰减更多)-3dB这个点对应我们的电压来说是0.707。设计电路可以留一定的余量,如果你把4k设计为截止频率,那么4k时候衰减倍数为-3dB通常是不够的,你可以将截止频率设为2k,那么4k的衰减就可以达到15dB(假设),根据自己的需要去设计对应的截止频率。理想的滤波器是当输入的信号频率大于截止频率时,大于部分的频率对应的电压信号直接归0。
An工具介绍之摄像头
An工具介绍之摄像头
高翔【自动驾驶与机器人中的SLAM技术】学习笔记
高翔【自动驾驶与机器人中的SLAM技术】学习笔记
Python实战:高效稳定采集微信视频号评论的API爬虫方案
网络爬虫是数据采集领域的核心技术,其原理是通过程序模拟浏览器行为,向目标服务器发送HTTP请求并解析响应数据,从而自动化获取网页或接口中的信息。这项技术的核心价值在于能够高效、批量化地收集公开数据,为市场分析、舆情监控和竞品研究提供数据基础。在社交媒体分析、电商价格监控等应用场景中,爬虫技术尤为重要。针对微信视频号这类动态加载的复杂应用,传统的GUI自动化工具(如影刀RPA)常面临性能瓶颈和风控挑战。本文聚焦于通过Python实现**无感采集**,直接与后端**API接口**交互,构建稳定高效的评论数据采集
匈牙利算法
基础的数论算法
变邻域搜索(VNS)原理梳理和应用细节-附求解VRPTW问题C++代码
文章目录1、简介-introduction2、VNS的基本机制2.1 变邻域下降方法-Variable Neighborhood Descent2.2基本变邻域搜索方法-Basic Variable Neighborhood Search2.3 终止准则3、VNS的拓展和混杂算法3.1 VNS的拓展3.2 变邻域分解搜索-Variable Neighborhood Decomposition Search3.3 偏变邻域搜索-Skewed VNS3.4 并行变邻域搜索-Parallel VNS4、VNS和其
如何用Timer模型处理多变量时间序列?附完整代码示例
本文深入解析了如何运用清华大学的Timer模型处理多变量时间序列预测任务。通过一个完整的智能工厂设备监控实战案例,详细介绍了从数据预处理、模型构建、训练调优到预测可视化的全流程,并提供了可运行的完整代码示例,帮助开发者掌握这一强大的时序分析工具。
蓝桥杯算法学习笔记C++B组
蓝桥杯算法学习笔记C++B组 去发现同类优质开源项目:https://gitcode.com/ 资源描述 本仓库提供了一份详细的蓝桥杯算法学习笔记,专为C++ B组竞赛准备。笔记内容涵盖了蓝桥杯竞赛中常见的算法和数据结构,旨在帮助参赛者系统地复习和巩固相关知识。 内容概述 笔记内容包括但不限于以下几个方面: 基础算法:排序、查找、递归、动态规划等。 数据结构:数组、链表、栈、队列、树、图等。 经...
R以及Rstudio超详细安装教程(包括安装过程中出现的问题)
R安装及Rstudio安装,以及安装中出现的问题
算法导论学习笔记
1
温度PID控制PLC程序
温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值
efm32 入门.pdf
本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。
STL学习笔记-查找算法
深度学习工具包 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');```[](https://bitdeli.com/free "Bitdeli Badge")
点云学习笔记8——RANSAC点云粗配准算法
【代码】点云学习笔记8——RANSAC点云粗配准算法。
(算法) 入门——<迷宫问题>
【代码】(算法) 入门——
数据结构与算法学习笔记
散列表用的是数组支持按照下标随机访问数据的特性,所以散列表其实就是数组的一种扩展,由数组演化而来。可以说,如果没有数组,就没有散列表。
字节跳动二面被血虐,狂补spring/并发/算法我又可以了!
“去面试今日头条,你最好有点心理准备。我面试过头条的好兄弟给了我一句忠告”。 为了等到这一天,我前天排老长队理了个利落的发型,胡子刮得一干二净,好好捯饬自己一番。并且我认为自己准备很充分,但这次面结束之后,除了概念以外问的我就有点懵逼了,出来之后就觉得自己凉凉的一匹~内心非常不甘... 所以,回到家我就把这次面试主要知识点做了一个分类并整理出来,接下来就开始了我漫漫长路的狂补之路!分为并发编程,spring,算法,等等! 我一直都认为好东西就应该拿出来分享,所以,就不自觉给大家分享一下我花了.
[STL学习笔记] <aglorithm>
e... 转载于:https://my.oschina.net/pzc/blog/318964
第二章分治法思维导图
算法学习笔记——分治法
美团面试惨败!强迫症的我恶补知识,总结面试经验和学习笔记,下次再战!!
面试大概九十分钟,问的东西很全面,需要做充足准备,就是除了概念以外问的有点懵逼了(呜呜呜~)。回来之后把这些题目做了一个分类并整理出答案分为MySQL+Java+Redis+算法+网络+Linux等六类,接下来分享一下我的这次美团一面面经++一些我的学习笔记。
算法课程笔记——johnson全源最短路
算法课程笔记——johnson全源最短路。
2025年5月27日第一轮
学习收获:总结本次学习掌握的新知识点、技能,以及对原有知识体系的补充和完善。存在问题:梳理学习过程中遇到的问题,如知识理解不透彻、解题方法不熟练等。改进措施:针对存在的问题,制定相应的解决计划,如增加练习量、重新学习相关章节、寻求同学或老师帮助等。计算机计算处理动态分区分配算法1三个例题微信平台开发最简单的考研例题作文。
C++学习笔记
本文为学习C++时做的笔记,参考视频为bilibili的黑马程序员的C++入门教程**浅拷贝:**简单的拷贝赋值操作**深拷贝:**在堆区重新申请空间,进行拷贝操作 **总结:**如果属性有在堆区开辟的,一定要自己提供拷贝构造函数,防止浅拷贝带来的问题**作用:**C++提供了初始化列表语法,用来初始化属性 1.3 类对象作为类成员 类中的成员可以是另一个类的对象 B类中有对象A作为成员,A作为对象成员。先构造A,再构造B。析构与构造顺序相反静态成员分为: 2. C++对象模型和this指针 2.1 成员变
代码随想录学习笔记
题目链接:https://leetcode.cn/problems/search-insert-position/description/my_code:主要是findLeft函数的理解,因为是有序的,所以,如果在右半部分mid找到了,那么下面肯定是左边继续计算,右边肯定一点都不会计算了,所以最后会在左边找到合适的最小的(因为如果有一样的重复数据的话,右边的mid会继续往左边去,直到最后一个重复的target)。时间复杂度:O(logn),其中 n 为数组的长度。
6185
148
6826
246
228
401
1123
342

被折叠的 条评论
为什么被折叠?



