Loading

随笔分类 -  codility

codility
摘要:翻转一枚硬币,最大的相同硬币数 阅读全文
posted @ 2017-02-22 20:16 stono 阅读(303) 评论(0) 推荐(0)
摘要:左侧数组最大值减去右侧数组最大值的最大绝对值 阅读全文
posted @ 2017-02-22 20:15 stono 阅读(558) 评论(0) 推荐(0)
摘要:1. CountDiv 数数有几个 Compute number of integers divisible by k in range [a..b]. 阅读全文
posted @ 2017-02-22 20:12 stono 阅读(313) 评论(0) 推荐(0)
摘要:1. MaxCounters 计数器 Calculate the values of counters after applying all alternating operations: increase counter by 1; set value of all counters to current maximum. 阅读全文
posted @ 2017-02-21 23:10 stono 阅读(454) 评论(0) 推荐(0)
摘要:1. FrogRiverOne 一苇渡江 Find the earliest time when a frog can jump to the other side of a river. 阅读全文
posted @ 2017-02-21 21:59 stono 阅读(503) 评论(0) 推荐(0)
摘要:1. PermCheck 桃花顺检验 Check whether array A is a permutation. 阅读全文
posted @ 2017-02-21 16:31 stono 阅读(458) 评论(0) 推荐(0)
摘要:1. MissingInteger 最小遗失整数 Find the minimal positive integer not occurring in a given sequence. 阅读全文
posted @ 2017-02-21 16:18 stono 阅读(436) 评论(0) 推荐(0)
摘要:1.数组之差 TapeEquilibrium Minimize the value |(A[0] + ... + A[P-1]) - (A[P] + ... + A[N-1])|. 阅读全文
posted @ 2017-02-20 13:41 stono 阅读(458) 评论(0) 推荐(0)
摘要:1. 少了一个PermMissingElem Find the missing element in a given permutation. 阅读全文
posted @ 2017-02-20 11:14 stono 阅读(415) 评论(0) 推荐(0)
摘要:1.数组小挪移 CyclicRotation Rotate an array to the right by a given number of steps. 阅读全文
posted @ 2017-02-20 10:24 stono 阅读(327) 评论(0) 推荐(0)
摘要:1. 找出数组中的单身狗OddOccurrencesInArray Find value that occurs in odd number of elements. 阅读全文
posted @ 2017-02-20 10:14 stono 阅读(1291) 评论(0) 推荐(0)
摘要:1. 求整数最大的连续0的个数 BinaryGap Find longest sequence of zeros in binary representation of an integer. 阅读全文
posted @ 2017-02-18 13:10 stono 阅读(521) 评论(0) 推荐(0)