
算法解题笔记
onehao
这个作者很懒,什么都没留下…
展开
-
Task Scheduling problem.
the background is in https://www.hackerrank.com/challenges/task-scheduling1. pruning.2. try to use the previous parsing result.3. 当insert index小于 max index的时候, 可以将max index 之前的元素全部删除。4. (4原创 2013-07-01 21:38:34 · 914 阅读 · 0 评论 -
判断素数
判断素数Rabin-Miller Strong Pseudoprime Testhttp://mathworld.wolfram.com/Rabin-MillerStrongPseudoprimeTest.html原创 2013-07-01 21:51:53 · 473 阅读 · 0 评论 -
Changing Bits
problem background : https://www.hackerrank.com/challenges/changing-bitsC#1. char 做异或操作效率比int高。2. 用string表示大数时注意Reverse.3. int.tryParse 效率 高于 int.Parse 高于 Convert.ToInt32()4. 考虑使用BigInteger类原创 2013-07-01 21:41:08 · 580 阅读 · 0 评论 -
【hackerrank】Insertion Sort Advanced Analysis
问题ORTree,红黑树Insertion Sort is a simple sorting technique which was covered in previous challenges. Sometimes, arrays may be too large for us to wait around for insertion sort to finish. Is there some other wa原创 2014-05-14 23:28:16 · 881 阅读 · 0 评论 -
[HackerRank]Gem Stones
Gem StonesJohn 发现了很多种岩石。每种岩石都有一个独一无二成分:由小写英文字母组成。宝石是由一个单一的字符组成,并且将在所有岩石中出现。给出一些岩石的成分,输出有多少种不同的宝石存在。输入格式第一行包含一个整数 N, 代表岩石的个数接下来的N行,每行包含岩石的构成,由小写的英文字母组成。输出格式输出有多少种不同的宝石数据范围1 ≤ N ≤ 1001 ≤ 代表岩石组原创 2014-05-20 11:30:20 · 740 阅读 · 0 评论