Example Test Report - Codility
Example Test Report - Codility
SqlSum
90%
3 min 100%
SQL (PostgreSQL)
BugfixingLeaderSorted
3 min 100%
Java 8
Equi
8 min 70%
Python
Tasks Details
1.
SqlSum
Elementary
Given a table elements with the following structure: Programming language used: SQL (PostgreSQL)
write an SQL query that returns the sum of the numbers in Effective time used: 3 minutes
column v.
---
10
20
09:24:21 09:37:39
10
https://app.codility.com/public-report-detail/ 1/6
8/10/22, 4:18 PM Example test report - Codility
2 SELECT sum(v)
3 FROM elements;
Analysis summary
Analysis
example test
▶ build.tests.TestBase - ✔ OK
test_011_simple2
▶ build.tests.TestBase - ✔ OK
test_012_simple3
▶ build.tests.TestBase - ✔ OK
test_020_single
[10]
▶ build.tests.TestBase - ✔ OK
test_021_small
▶ build.tests.TestBase - ✔ OK
test_022_small2
▶ build.tests.TestBase - ✔ OK
test_023_small3
▶ build.tests.TestBase - ✔ OK
test_024_small4
▶ build.tests.TestBase - ✔ OK
test_030_medium
▶ build.tests.TestBase - ✔ OK
test_040_large
2.
BugfixingLeaderSorted
Find and correct bugs in a
Task Score Correctness Performance
Easy
A non-empty array A consisting of N integers and sorted in a non- Programming language used: Java 8
decreasing order (i.e. A[0] ≤ A[1] ≤ ... ≤ A[N−1]) is given. The
leader of this array is the value that occurs in more than half of Total time used: 10 minutes
the elements of A.
Assume that:
▶ example2
✔ OK
second example test
▶ simple2
✔ OK
0s/1s only
▶ single
✔ OK
one element
https://app.codility.com/public-report-detail/ 3/6
8/10/22, 4:18 PM Example test report - Codility
▶ two_values
✔ OK
two different values
▶ extreme_big_values
✔ OK
min/max values only
▶ medium_1
✔ OK
small sequence repeated many times
▶ medium_2
✔ OK
no leader and small sequence with
values from a continuous range
▶ cyclic_sequence
✔ OK
no leader and small sequence
repeated many times
▶ medium_random
✔ OK
random sequences
▶ large
✔ OK
two different values, length = ~100,000
▶ large_range
✔ OK
values from a continuous range, length
= ~100,000
3.
Equi
Task Score Correctness Performance
Medium
Task timeline
Sum of zero elements is assumed to be equal to 0. This can
happen if P = 0 or if P = N−1.
A[1] = 3
final,
score:
70
A[3] = 5
A[4] = 1
A[6] = 2
3
5 n=len(A)
7 if(n==0):
10 for i in range(n):
12 sum_right=0
14 for j in range(n):
https://app.codility.com/public-report-detail/ 4/6
8/10/22, 4:18 PM Example test report - Codility
P = 7 is also an equilibrium index, because: 15 if(mm<A[j]):
16 mm=A[j]
18 sum_left+=A[j]
19 for j in range(i+1,n):
22 if(sum_left==sum_right):
condition 0 ≤ P < N.
23 return i
24 return(-1)
Write a function:
def solution(A)
For example, given array A shown above, the function may return The following issues have been detected: timeout errors.
1, 3 or 7, as explained above.
▶ extreme_large_numbers
✔ OK
Sequence with extremely large
numbers testing arithmetic overflow.
▶ extreme_negative_numbers
✔ OK
Sequence with extremely large
numbers testing arithmetic overflow.
▶ overflow_tests1
✔ OK
arithmetic overflow tests
▶ overflow_tests2
✔ OK
arithmetic overflow tests
▶ one_large
✔ OK
one large number at the end of the
sequence
▶ sum_0
✔ OK
sequence with sum=0
▶ single_empty
✔ OK
single number or empty array
▶ combinations_of_two
✔ OK
multiple runs, all pairs of values: -1, 0
and 1
▶ combinations_of_three
✔ OK
multiple runs, all triples of values -1, 0
and 1
▶ small_pyramid ✔ OK
https://app.codility.com/public-report-detail/ 5/6
8/10/22, 4:18 PM Example test report - Codility
6.000 sec.
▶ medium_pyramid ✔ OK
▶ large_pyramid
✘ TIMEOUT ERROR
▶ huge_pyramid
✘ TIMEOUT ERROR
https://app.codility.com/public-report-detail/ 6/6