2017年5月1日

Codility---Brackets

摘要: Task description A string S consisting of N characters is considered to be properly nestedif any of the following conditions is true: S is empty; S ha 阅读全文

posted @ 2017-05-01 00:31 Hugh_Sun 阅读(369) 评论(0) 推荐(0) 编辑

2017年4月30日

Codility--- NumberOfDiscIntersections

摘要: Task description We draw N discs on a plane. The discs are numbered from 0 to N − 1. A zero-indexed array A of N non-negative integers, specifying the 阅读全文

posted @ 2017-04-30 23:43 Hugh_Sun 阅读(616) 评论(0) 推荐(0) 编辑

2017年4月29日

Codility---MaxProductOfThree

摘要: Task description A non-empty zero-indexed array A consisting of N integers is given. Theproduct of triplet (P, Q, R) equates to A[P] * A[Q] * A[R] (0 阅读全文

posted @ 2017-04-29 08:30 Hugh_Sun 阅读(248) 评论(0) 推荐(0) 编辑

Codility--- Triangle

摘要: Task description A zero-indexed array A consisting of N integers is given. A triplet (P, Q, R) is triangular if 0 ≤ P < Q < R < N and: A[P] + A[Q] > A 阅读全文

posted @ 2017-04-29 07:53 Hugh_Sun 阅读(574) 评论(0) 推荐(0) 编辑

Codility--- Distinct

摘要: Task description Write a function class Solution { public int solution(int[] A); } that, given a zero-indexed array A consisting of N integers, return 阅读全文

posted @ 2017-04-29 07:22 Hugh_Sun 阅读(348) 评论(0) 推荐(0) 编辑

2017年4月28日

Codility---MinAvgTwoSlice

摘要: Task description A non-empty zero-indexed array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P < Q < N, is called a s 阅读全文

posted @ 2017-04-28 12:09 Hugh_Sun 阅读(251) 评论(0) 推荐(0) 编辑

Codility---GenomicRangeQuery

摘要: Task description A DNA sequence can be represented as a string consisting of the letters A, C, G and T, which correspond to the types of successive nu 阅读全文

posted @ 2017-04-28 11:32 Hugh_Sun 阅读(573) 评论(0) 推荐(0) 编辑

Codility----PassingCars

摘要: Task description A non-empty zero-indexed array A consisting of N integers is given. The consecutive elements of array A represent consecutive cars on 阅读全文

posted @ 2017-04-28 10:10 Hugh_Sun 阅读(322) 评论(0) 推荐(0) 编辑

Codility---CountDiv

摘要: Task description Write a function: class Solution { public int solution(int A, int B, int K); } that, given three integers A, B and K, returns the num 阅读全文

posted @ 2017-04-28 09:38 Hugh_Sun 阅读(356) 评论(0) 推荐(0) 编辑

Codility----MaxCounters

摘要: Task description You are given N counters, initially set to 0, and you have two possible operations on them: increase(X) − counter X is increased by 1 阅读全文

posted @ 2017-04-28 00:04 Hugh_Sun 阅读(273) 评论(0) 推荐(0) 编辑

导航