Codility4 [Codility] TapeEquilibrium - JAVA 1. 문제TapeEquilibrium coding task - Learn to Code - CodilityMinimize the value |(A[0] + ... + A[P-1]) - (A[P] + ... + A[N-1])|.app.codility.comA non-empty array A consisting of N integers is given. Array A represents numbers on a tape. Any integer P, such that 0 < P < N, splits this tape into two non-empty parts: A[0], A[1], ..., A[P − 1] and A[P], A[P + 1], ..., A[N − 1]. The difference between .. 코딩테스트/ELSE 2023. 6. 23. [Codility] OddOccurrencesInArray - JAVA 1. 문제 OddOccurrencesInArray coding task - Learn to Code - Codility Find value that occurs in odd number of elements. app.codility.com A non-empty array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same value, except for one element that is left unpaired. For example, in array A suc.. 코딩테스트/ELSE 2023. 6. 22. [Codility] CyclicRotation - Java 1. 문제 CyclicRotation coding task - Learn to Code - Codility Rotate an array to the right by a given number of steps. app.codility.com An array A consisting of N integers is given. Rotation of the array means that each element is shifted right by one index, and the last element of the array is moved to the first place. For example, the rotation of array A = [3, 8, 9, 7, 6] is [6, 3, 8, 9, 7] (ele.. 코딩테스트/ELSE 2023. 6. 22. [CODILITY] BinaryGap - Java 1. 문제 BinaryGap coding task - Learn to Code - Codility Find longest sequence of zeros in binary representation of an integer. app.codility.com A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. For example, number 9 has binary representation 1001 and contains a binary gap of length 2. Th.. 코딩테스트/ELSE 2023. 3. 19. 이전 1 다음