[Codility] Lesson3. PermMissingElem - 문제풀이 Description 주어진 배열에서 1~N+1 사이의 값중 비어있는 값을 찾아서 반환하는 문제입니다. An array A consisting of N different integers is given. The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing. Your goal is to find that missing element. Write a function: class Solution { public int solution(int[] A); } that, given an array A, returns the value of the missing element. For .. 알고리즘/Codility 3년 전
[Codility] Lesson1. BinaryGap Description 양의 정수 N이 주어지면 가장 긴 이진 간격의 길이를 반환합니다. N에 이진 간격이 없으면 함수는 0을 반환해야 합니다. 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 .. 알고리즘/Codility 3년 전