profile
functionMan
post-thumbnail

Codility_CountNonDivisible

11-1. CountNonDivisibleYou are given an array A consisting of N integers.For each number Ai such that 0 ≤ i < N, we want to count the number of ele

2024년 9월 2일
·
0개의 댓글
·
post-thumbnail

Codility_Peaks

10-4. PeaksA non-empty array A consisting of N integers is given.A peak is an array element which is larger than its neighbors. More precisely, it is

2024년 9월 1일
·
0개의 댓글
·
post-thumbnail

Codility_Flags

10-3. FlagsA non-empty array A consisting of N integers is given.A peak is an array element which is larger than its neighbours. More precisely, it is

2024년 8월 31일
·
0개의 댓글
·
post-thumbnail

Codility_MinPerimeterRectangle

10-2. MinPerimeterRectangleAn integer N is given, representing the area of some rectangle.The area of a rectangle whose sides are of length A and B is

2024년 8월 30일
·
0개의 댓글
·
post-thumbnail

Codility_CountFactors

10-1. CountFactorsA positive integer D is a factor of a positive integer N if there exists an integer M such that N = D \* M.For example, 6 is a facto

2024년 8월 29일
·
0개의 댓글
·
post-thumbnail

Codility_MaxDoubleSliceSum

9-3. MaxDoubleSliceSumA non-empty array A consisting of N integers is given.A triplet (X, Y, Z), such that 0 ≤ X < Y < Z < N, is called a dou

2024년 8월 28일
·
0개의 댓글
·
post-thumbnail

Codility_MaxSliceSum

9-2. MaxSliceSumA non-empty array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P ≤ Q < N, is called a slice of arr

2024년 8월 27일
·
0개의 댓글
·
post-thumbnail

Codility_MaxProfit

9-1. MaxProfitAn 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

2024년 8월 26일
·
0개의 댓글
·
post-thumbnail

Codility_EquiLeader

8-2. EquiLeaderA non-empty array A consisting of N integers is given.The leader of this array is the value that occurs in more than half of the elemen

2024년 8월 25일
·
0개의 댓글
·
post-thumbnail

Codility_Dominator

8-1. DominatorAn array A consisting of N integers is given. The dominator of array A is the value that occurs in more than half of the elements of A.F

2024년 8월 25일
·
0개의 댓글
·
post-thumbnail

Codility_StoneWall

7-4. StoneWallYou are going to build a stone wall. The wall should be straight and N meters long, and its thickness should be constant; however, it sh

2024년 8월 23일
·
0개의 댓글
·
post-thumbnail

Codility_Nesting

7-3. NestingA string S consisting of N characters is called properly nested if:S is empty;S has the form "(U)" where U is a properly nested string;S h

2024년 8월 22일
·
0개의 댓글
·
post-thumbnail

Codility_Fish

7-2. FishYou are given two non-empty arrays A and B consisting of N integers. Arrays A and B represent N voracious fish in a river, ordered downstream

2024년 8월 21일
·
0개의 댓글
·
post-thumbnail

Codility_Brackets

7-1. BracketsA string S consisting of N characters is considered to be properly nested if any of the following conditions is true:S is empty;S has the

2024년 8월 20일
·
0개의 댓글
·
post-thumbnail

Codility_NumberOfDiscIntersections

6-4.NumberOfDiscIntersectionsWe draw N discs on a plane. The discs are numbered from 0 to N − 1. An array A of N non-negative integers, specifying the

2024년 8월 19일
·
0개의 댓글
·

Codility_Triangle

6-3. Triangle An array A consisting of N integers is given. A triplet (P, Q, R) is triangular if 0 ≤ P A[R], A[Q] + A[R] > A[P], A[R] + A[P] > A[Q]. For example, consider array A such that: A[0] =...

2024년 8월 18일
·
0개의 댓글
·
post-thumbnail

Codility_MaxProductOfThree

6-2. MaxProductOfThreeA non-empty array A consisting of N integers is given. The product of triplet (P, Q, R) equates to AP AQ AR (0 ≤ P < Q <

2024년 8월 14일
·
0개의 댓글
·
post-thumbnail

Codility_Distinct

Codility_Distinct6-1. DistinctWrite a functionclass Solution { public int solution(int\[] A); }that, given an array A consisting of N integers, return

2024년 8월 14일
·
0개의 댓글
·
post-thumbnail

Codility_MinAvgTwoSlice

5-4. MinAvgTwoSliceA non-empty array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P < Q < N, is called a slice

2024년 8월 13일
·
0개의 댓글
·
post-thumbnail

Codility_GenomicRangeQuery

5-3. GenomicRangeQueryFor example, consider string S = CAGCCTA and arrays P, Q such that:The answers to these M = 3 queries are as follows:The part of

2024년 8월 12일
·
0개의 댓글
·