![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codility
文章平均质量分 78
小小小小小胖子
Learn different
展开
-
Codility-StoneWall
You are going to build a stone wall. The wall should be straight and N meters long, and its thickness should be constant; however, it should have different heights in different places. The height of t原创 2014-07-21 16:10:23 · 1018 阅读 · 0 评论 -
Codility-FigFrog
The Fibonacci sequence is defined using the following recursive formula: F(0) = 0 F(1) = 1 F(M) = F(M - 1) + F(M - 2) if M >= 2A small frog wants to get to the other side of a river.原创 2014-09-24 15:57:32 · 671 阅读 · 0 评论 -
Codility-FibFrog
The Fibonacci sequence is defined using the following recursive formula: F(0) = 0 F(1) = 1 F(M) = F(M - 1) + F(M - 2) if M >= 2A small frog wants to get to the other side of a river.原创 2014-09-24 15:45:58 · 2480 阅读 · 0 评论 -
Codility-ChocolatesByNumbers
Task descriptionTwo positive integers N and M are given. Integer N represents the number of chocolates arranged in a circle, numbered from 0 to N − 1.You start to eat the chocolates. After eat原创 2014-08-29 21:21:46 · 1474 阅读 · 0 评论 -
Codility-CountNonDivisible
Task descriptionYou are given a non-empty zero-indexed array A consisting of N integers.For each number A[i] such that 0 ≤ i For example, consider integer N = 5 and array A such that:原创 2014-07-30 16:35:21 · 1138 阅读 · 0 评论 -
Codility-Flags
Task descriptionA non-empty zero-indexed array A consisting of N integers is given. Apeak is an array element which is larger than its neighbours. More precisely, it is an index P such that 0 A原创 2014-07-29 16:08:10 · 1580 阅读 · 0 评论 -
Codility-Peak
Task descriptionA non-empty zero-indexed array A consisting of N integers is given.A peak is an array element which is larger than its neighbors. More precisely, it is an index P such that 0原创 2014-07-27 15:33:39 · 852 阅读 · 0 评论 -
Codility-MinPerimeterRectangle
Task descriptionAn integer N is given, representing the area of some rectangle.The area of a rectangle whose sides are of length A and B is A * B, and the perimeter is 2 * (A + B).The goal i原创 2014-07-26 10:15:30 · 769 阅读 · 0 评论 -
Codility-MaxSliceSum&MaxDoubleSlice
Task descriptionA non-empty zero-indexed array A consisting of N integers is given.A triplet (X, Y, Z), such that 0 ≤ X double slice.The sum of double slice (X, Y, Z) is the total of A[X + 1原创 2014-07-25 10:49:39 · 939 阅读 · 0 评论 -
Codility-MaxProfit
Task descriptionA zero-indexed array A consisting of N integers is given. It contains daily prices of a stock share for a period of N consecutive days. If a single share was bought on day P and原创 2014-07-24 11:05:38 · 892 阅读 · 0 评论 -
Codility-EquiLeader
Task descriptionA non-empty zero-indexed array A consisting of N integers is given.The leader of this array is the value that occurs in more than half of the elements of A.An equi leader is原创 2014-07-23 15:45:08 · 1479 阅读 · 0 评论 -
Codility-Fish
Task descriptionYou are given two non-empty zero-indexed arrays A and B consisting of N integers. Arrays A and B represent N voracious fish in a river, ordered downstream along the flow of the r原创 2014-07-22 10:37:46 · 756 阅读 · 0 评论