![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Algorithm
文章平均质量分 77
Sagittarius_Warrior
这个作者很懒,什么都没留下…
展开
-
算法学习之Asymptotic Analysis
Asymptotic Analysis是一种简化的分析算法时间复杂度的方法,它主要应用big Oh notation。the rules for computing and manipulating big oh expressions greatly simplify the analysis of the running time of a program when all we are原创 2015-12-10 10:09:48 · 634 阅读 · 0 评论 -
单词接龙
最近碰到了一个比较有意思的算法题 —— 单次接龙,我尝试做了一下,虽然能解,但是时间复杂度让我很不满意,于是google了网友的解法,找到一个比较满意的算法 —— 链接,作者是用JAVA实现的,我在此将它转换为C++实现。 问题描述 拉姆刚开始学习英文单词,对单词排序很感兴趣。如果给拉姆一组单词,他能够迅速确定是否可以将这些单词排列在一个列表中,使得该列表中任何单词的...原创 2018-03-28 17:06:51 · 2338 阅读 · 0 评论 -
杨辉三角形生成器
《程序员的数学》通过“杨辉三角形”(Pascal’s Triangle)的演示了一种“从复杂问题中发现隐含递归结构”的方法:1)从整体中隐去部分问题;2)判断剩余部分是否和整体问题是同类问题。通过这种方法可以很好的解释“为什么杨辉三角形中会出现组合数”。 《程序员的数学》只是揭开了“杨辉三角形”神秘的一角:相邻两数之和、阶乘、路径选择、组合数。除了这些,MathisFun - Pascal’原创 2018-02-05 11:16:53 · 2271 阅读 · 0 评论 -
探索Crypto++(一)下载、编译和部署
Crypto++是一个开源的C++加密算法库,它包括密码、消息认证码,单向散列函数,公钥密码机制,关键协议方案,缩小压缩等加密算法。本文将介绍Crypto++库从下载到项目应用的基本步骤。(本人目前的项目需要的是AES文件加密算法,其他的留待以后探索)一、下载1,登陆官网:https://www.cryptopp.com/2,点击“Download”,将显示如下的下载列表原创 2016-11-30 16:31:50 · 6657 阅读 · 0 评论 -
加密算法资源帖
近期,针对公司的软件产品,需要设计一套License系统,保证它不被非授权用户使用。而License系统的关键点之一就是对License文件进行加密,于是,我需要先研究一下加密算法。按照一般步骤,先google一下,找到了如下有效资源,分享如下:1,SSL常见加密算法 http://www.willrey.com/support/ssl_des.html 这是一个理论帖,介原创 2016-11-29 09:18:52 · 784 阅读 · 0 评论 -
算法学习之“Omega“、“Theta”和“Little Oh”
一、An asymptotical lower bound - OmegaThe big oh notation introduced in the preceding section is an asymptotic upper bound. In this section, we introduce a similar notation for characterizing the a原创 2015-12-09 10:32:31 · 1654 阅读 · 0 评论 -
算法学习之“Big Oh Notation”
一、Asymptotic analysisSuppose we are considering two algorithms, A and B, for solving a given problem. Furthermore, let us say that we have done a careful analysis of the running times of each of t原创 2015-12-08 10:36:44 · 4263 阅读 · 0 评论 -
算法学习之调和级数
Harmonic numbers(调和级数,参考链接:About Harmonic numbers)常用于算法分析,它的最大特征是:随着n取值的增大,相邻的两个Harmonic numbers的差将变小,且它不收敛,趋向于无穷,只是递增的趋势会越来越慢。原文如下:A remarkable characteristic of harmonic numbers is that, even thou原创 2015-12-04 11:13:16 · 3613 阅读 · 0 评论 -
算法学习之求数列和
Question:Given a sequence of n integers, , and a small positive integer k, write an algorithm to compute(原题:点击打开链接)技巧:1,应用Honer's Rule,进行累积运算,减少循环层次;2,应用bitwise shifts,将乘二变成左移一位;原创 2015-12-04 16:25:19 · 598 阅读 · 0 评论 -
算法学习之几何数列求和算法分析
The series, , is an arithmetic series,and The series, , is a geometric series。本文主要分析三种计算Geometric series summation的算法,应用的是简化模型。1,直接法(点击打开链接)int GeometricSeriesSum(int x, unsigned n){ in原创 2015-12-04 14:04:26 · 2078 阅读 · 0 评论 -
算法学习之Honer's Rule
The usual way to evaluate such polynomials is to use Horner's rule, which is an algorithm to compute the summation without requiring the computation of arbitrary powers of x. Horner's Rule用于多项式原创 2015-12-03 16:17:02 · 774 阅读 · 0 评论 -
算法学习之Bucket Sort
一、定义(参考wiki:点击打开链接)Bucket sort, or bin sort, is a sorting algorithm that works by distributing the elements of an array into a number of buckets. Each bucket is then sorted individually, eit原创 2015-12-14 10:43:02 · 778 阅读 · 0 评论 -
算法学习之Fibonacci Numbers生成算法分析
Fibonacci Numbers(点击打开链接) 0,1,1,2,3,4,8,13,21,34,...Program 1 (iterative algorithm):unsigned int Fibonacci(unsigned int n){ int previous = -1; int result = 1; for (unsigned int i原创 2015-12-10 10:51:57 · 1293 阅读 · 0 评论 -
Some Basic and Inefficient Prime Number Generating Algorithms
转载一篇素数生成算法文章: https://en.wikibooks.org/wiki/Some_Basic_and_Inefficient_Prime_Number_Generating_Algorithms转载 2018-04-12 15:48:20 · 666 阅读 · 0 评论