摘要:
基数排序 这里我们先上原理图 基数排序其实就是对一个数按位进行拆分然后分别排序。具体实现(以三位数为例):我们先排序个位,部分的顺序发生改变。然后我们再对十位进行排列,最后,我们对百位进行排列。 基数排序的实现方法有很多种,在这里我们假设有十个桶,编号分别为0,1,2,3,4,5,6,7,8,9,如 阅读全文
posted @ 2021-09-19 18:06
ChrisNg
阅读(442)
评论(0)
推荐(0)
摘要:
欧拉计划003--最大质因数 Largest prime factor The prime factors of \(13195\) are \(5\), \(7\), \(13\) and \(29\). What is the largest prime factor of the number 阅读全文
posted @ 2021-09-19 18:03
ChrisNg
阅读(187)
评论(0)
推荐(0)
摘要:
欧拉计划002--偶斐波那契数 首先看一下题目 Even Fibonacci numbers Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 阅读全文
posted @ 2021-09-19 17:50
ChrisNg
阅读(144)
评论(0)
推荐(0)
摘要:
001欧拉计划001--3或5的倍数 首先,展示一下题目。 Multiples of 3 and 5 If we list all the natural numbers below \(10\) that are multiples of \(3\) or \(5\) , we get \(3\) 阅读全文
posted @ 2021-09-19 17:39
ChrisNg
阅读(108)
评论(0)
推荐(0)