
算法
hellyou
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
华为4.6号机试第一题
华为机试4.6 第一题原创 2022-04-07 10:25:07 · 515 阅读 · 0 评论 -
力扣刷题日记
个人记录原创 2021-12-16 21:16:40 · 3955 阅读 · 0 评论 -
StochasticPooling 随机池化的PyTorch实现
StochasticPooling 随机池化的PyTorch实现 引用该代码请联系告知我原创 2021-06-08 11:57:30 · 1642 阅读 · 5 评论 -
Pytorch拓展C++和CUDA:讲解和细节
Pytorch拓展C++ 以及 CUDA 文件结构和运行方式 #method 1 code/ test.cpp test.cu setup.py test.py callandrun.py #method 2 code/ test.cpp test.cu setup.py test.py callandrun.py 首先新建一个目录,目录里...原创 2020-04-10 09:48:47 · 4239 阅读 · 3 评论 -
用联机算法求最大子列和
在《数据结构和算法分析——C语言描述》一书中,有一段关于求最大子列和的算法比较,其中提到了用联机算法实现。我们首先说一说联机算法,百度词条给出的定义是这样的联机算法是在任意时刻算法对要操作的数据只读入(扫描)一次,一旦被读入并处理,它就不需要在被记忆了。 而在此处理过程中算法能对它已经读入的数据立即给出相应子序列问题的正确答案。 还有对这种算法的无比崇拜“该算法仅需要常量空间并以线性时间运行,因此...原创 2018-04-09 23:26:26 · 684 阅读 · 0 评论 -
leetcode 只出现一次的数字
class Solution: def singleNumber(self, nums): """ :type nums: List[int] :rtype: int """ stack = [] for i in nums: if i not in stack: ...原创 2018-05-04 19:21:46 · 246 阅读 · 0 评论 -
kmp改进算法
//这是第一次实现KMP算法 #include<stdio.h> #define MAXLEN 50 #include<string.h> int next[MAXLEN] = { 0 }; int nextval[MAXLEN] = { 0 }; void get_next(char s[],int lens) { int j = 0; int k = -1; next[...原创 2019-01-24 20:49:49 · 816 阅读 · 0 评论 -
KMP算法c++代码
先放代码,对着代码来讲一讲(代码没加注释) #include<iostream> #include<string.h> const int MAXLEN = 50; int next[MAXLEN] = { 0 }; int nextval[MAXLEN] = { 0 }; void get_next(char s[],int lens) { int j = 0...原创 2019-04-15 21:26:11 · 3869 阅读 · 2 评论