原创 Codility-MaxSliceSum&MaxDoubleSlice
MaxSliceSum: Task description A non-empty zero-indexed array A consisting of N integers is given. A pair of inte
原创 Codility-CountNonDivisible
Task description You are given a non-empty zero-indexed array A consisting of N integers. For each number A[i] such
原创 Codility-ChocolatesByNumbers
Task description Two positive integers N and M are given. Integer N represents the number of chocolates arranged in a
原创 Codility-Flags
Task description A non-empty zero-indexed array A consisting of N integers is given. Apeak is an array element whic
原创 Codility-FigFrog
The Fibonacci sequence is defined using the following recursive formula: F(0) = 0 F(1) = 1 F(M) = F(M - 1)
原创 Codility-MinPerimeterRectangle
Task description An integer N is given, representing the area of some rectangle. The area of a rectangle whose side
原创 Codility-CommonPrimeDivisors
Task description A prime is a positive integer X that has exactly two distinct divisors: 1 and X. The first few pri
原创 Codility-FibFrog
The Fibonacci sequence is defined using the following recursive formula: F(0) = 0 F(1) = 1 F(M) = F(M - 1)
原创 Codility-MaxProfit
Task description A zero-indexed array A consisting of N integers is given. It contains daily prices of a stock share
原创 Codility-StoneWall
You are going to build a stone wall. The wall should be straight and N meters long, and its thickness should be constan
原创 Codility-EquiLeader
Task description A non-empty zero-indexed array A consisting of N integers is given. The leader of this array is the
原创 Codility-CountSemiprimes
Task description A prime is a positive integer X that has exactly two distinct divisors: 1 and X. The first few prime
原创 Codility-Peak
Task description A non-empty zero-indexed array A consisting of N integers is given. A peak is an array element whi
原创 Codility-Dominator
Task description A zero-indexed array A consisting of N integers is given. The dominatorof array A is the value that
原创 Codility-Fish
Task description You are given two non-empty zero-indexed arrays A and B consisting of N integers. Arrays A and B r