본문 바로가기

코딩테스트

Codility Lesson 07 - Brackets( JAVA ) https://app.codility.com/programmers/lessons/7-stacks_and_queues/brackets/ Brackets coding task - Learn to Code - Codility Determine whether a given string of parentheses (multiple types) is properly nested. app.codility.com 문제 - N개의 character들도 이루어진 문자열 S가 주어진다. - S는 아래와 같으면 올바르게 중첩된 것으로 간주한다. S is empty; S has the form "(U)" or "[U]" or "{U}" where U is a properly nested string; S has the form.. 더보기
Codility Lesson 06 - NumberOfDiscIntersections( JAVA ) https://app.codility.com/programmers/lessons/6-sorting/number_of_disc_intersections/ NumberOfDiscIntersections coding task - Learn to Code - Codility Compute the number of intersections in a sequence of discs. app.codility.com 문제 - A배열은 N개의 양의 정수들의 배열로 0 ~ N-1까지의 숫자들의 디스크 집합이다. - J-번쨰 디스크는 중점이 (J, 0)이고 반지름은 A[J]이다. - J != K일 때 J, K-번째의 디스크들이 최소한 한개의 공통점이라도 가지면 교차한다고 한다. - 예시 There are eleven (un.. 더보기
Codility Lesson 06 - Triangle( JAVA ) https://app.codility.com/programmers/lessons/6-sorting/triangle/ Triangle coding task - Learn to Code - Codility Determine whether a triangle can be built from a given set of edges. app.codility.com 문제 - N개의 정수들로 이루어진 A배열이 주어진다. - (P, Q, R)은 triangular다. 0 ≤ P A[R], A[Q] + A[R] > A[P], A[R] + A[P] > A[Q] - 예시 : A[0] = 10 A[1] = 2 A[2] = 5 A[3] = 1 A[4] = 8 A[5] = 20 - T.. 더보기
Codility Lesson 06 - MaxProductOfThree( JAVA ) https://app.codility.com/programmers/lessons/6-sorting/max_product_of_three/ MaxProductOfThree coding task - Learn to Code - Codility Maximize A[P] * A[Q] * A[R] for any triplet (P, Q, R). app.codility.com 문제 - N개의 정수로 이루어진 A배열( 비어있지 않은 배열 )이 주어진다. - (P, Q, R) = A[P] * A[Q] * A[R]( 0 더보기
Codility Lesson 06 - Distinct( JAVA ) https://app.codility.com/programmers/lessons/6-sorting/distinct/ Distinct coding task - Learn to Code - Codility Compute number of distinct values in an array. app.codility.com 문제 - N개로 이루어진 A배열이 주어진다. - 각각 중복되지 않는 수들을 구하라. - 예시 : A[0] = 2 A[1] = 1 A[2] = 1 A[3] = 2 A[4] = 3 A[5] = 1 - return 3( 1, 2, 3이 중복되지 않는 수 ) 제한조건 N is an integer within the range [0..100,000]; each element of array A is a.. 더보기
Codility Lesson 05 - MinAvgTwoSlice( JAVA ) https://app.codility.com/programmers/lessons/5-prefix_sums/min_avg_two_slice/ MinAvgTwoSlice coding task - Learn to Code - Codility Find the minimal average of any slice containing at least two elements. app.codility.com 문제 - N개의 정수들로 이루어진 비어있지 않은 배열 A가 주어진다. - 0 더보기
Codility Lesson 05 - GenomicRangeQuery( JAVA ) https://app.codility.com/programmers/lessons/5-prefix_sums/genomic_range_query/ GenomicRangeQuery coding task - Learn to Code - Codility Find the minimal nucleotide from a range of sequence DNA. app.codility.com 문제 - DNA sequence는 비어있지 않은 배열( S = N characters )이다. - M queries는 M개의 정수들로 이루어진 P, Q 배열로 비어있지 않은 배열이다. - A, C, G, T 순서로 1, 2, 3, 4가 매칭되며 M쿼리에 따른 인덱스 범위 안에서 minimal impact factor(제일 낮은 수).. 더보기
Codility Lesson 05 - CountDiv( JAVA ) https://app.codility.com/programmers/lessons/5-prefix_sums/count_div/ CountDiv coding task - Learn to Code - Codility Compute number of integers divisible by k in range [a..b]. app.codility.com 문제 - A와 B사이의 정수 중( A, B 포함 ) K로 나누어 떨어지는 정수들의 개수를 구하라. 제한조건 A and B are integers within the range [0..2,000,000,000]; K is an integer within the range [1..2,000,000,000]; A ≤ B. A와 B는 0 ~ 2,000,000,000 사이.. 더보기