분류 전체보기 105

[알고리즘/Java] 코딜리티(Codility) Lesson 3-1 FrogJmp

A small frog wants to get to the other side of the road. The frog is currently located at position X and wants to get to a position greater than or equal to Y. The small frog always jumps a fixed distance, D. Count the minimal number of jumps that the small frog must perform to reach its target. Write a function: class Solution { public int solution(int X, int Y, int D); } that, given three inte..

[알고리즘/Java] 코딜리티(Codility) Lesson 2-2 OddOccurrencesInArray

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 such that: A[0] = 9 A[1] = 3 A[2] = 9 A[3] = 3 A[4] = 9 A[5] = 7 A[6] = 9 the elements at indexes 0 and 2 have value 9, the elements at i..

[알고리즘/Java] 코딜리티(Codility) Lesson 2-1 CyclicRotation

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] (elements are shifted right by one index and 6 is moved to the first place). The goal is to rotate array A K times; that is, each element ..

AWS Certified Developer – Associate 샘플문항 1번

1) 회사가 레거시 애플리케이션을 Amazon EC2로 마이그레이션 중입니다. 이 애플리케이션에서는 소스 코드에 저장된 사용자 이름과 암호를 사용하여 MySQL 데이터베이스에 연결합니다. 이 데이터베이스를 Amazon RDS for MySQL DB 인스턴스로 마이그레이션할 계획입니다. 회사는 마이그레이션 프로세스의 일부로 데이터베이스 자격 증명을 저장하고 자동으로 교체하는 안전한 방법을 구현하려고 합니다. 이러한 요구 사항을 충족하는 방법은 무엇입니까? A) 데이터베이스 자격 증명을 Amazon Machine Image (AMI)의 환경 변수에 저장합니다. AMI를 대체하여 자격 증명을 교체합니다. B) 데이터베이스 자격 증명을 AWS Systems Manager 파라미터 스토어에 저장합니다. 파라미터 ..

AWS/Associate 2021.06.02

[알고리즘/Java] 코딜리티(Codility) Lesson 1-1 BinaryGap

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. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 and one of length 3. The number 20 has binary r..