- 博客(13)
- 收藏
- 关注
原创 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
670
原创 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
2479
原创 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
1473
原创 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
1136
原创 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
1579
原创 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
851
原创 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
765
原创 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
936
原创 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
890
原创 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
1477
原创 Codility-Dominator
Task descriptionA zero-indexed array A consisting of N integers is given. The dominatorof array A is the value that occurs in more than half of the elements of A.For example, consider array A
2014-07-22 16:11:21
1015
原创 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
752
原创 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
1015
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人