728x90
반응형
SMALL

코테 25

[코딜리티] CyclicRotation

[코딜리티] CyclicRotation 문제요약 : 배열을 주어진 수만큼 shift해서 재정렬한다.풀이 : 배열의 길이보다 K가 클때는 동일한 결과가 나오기 때문에, 몫을 찾아준다.K = K % len; // shift 2 == shift 7 == shift 12 == ... 뒤에서 K번째부터 정답배열에 저장하고,len에 도달하면 처음부터 저장해주면 된다. // A = [3, 8, 9, 7, 6] // K = 2 // [7, 6] + [3, 8, 9] // return [7, 6, 3, 8, 9] Tasks Detailseasy1. CyclicRotationRotate an array to the right by a given number of ..

[코딜리티] Codility 플랫폼 친해지기 및 연습문제 시작하기

[코딜리티] Codility 플랫폼 친해지기 및 연습문제 시작하기 우선 코딜리티는 외국계 회사의 코딩테스트 플랫폼이다. (처음 알게된 사실..) 문제풀이를 하려면 공식 홈페이지에서는 접속 경로가 잘 안보이고코딜리티의 연습문제 데모 테스트는 아래 링크에 위치한다.https://app.codility.com/programmers/ Developer Training | Test Coding Skills Online - CodilityFind longest sequence of zeros in binary representation of an integer.app.codility.com 우상단 Sign up 눌러주고 회원가입 진행하면 된다. 로그인 후, See all Lessons를 클릭하면https:..

[해커랭크] Equalize the Array

https://www.hackerrank.com/challenges/equality-in-a-array/problem?isFullScreen=true Equalize the Array | HackerRankDelete a minimal number of elements from an array so that all elements of the modified array are equal to one another.www.hackerrank.com Given an array of integers, determine the minimum number of elements to delete to leave only elements of equal value.정수 배열이 주어졌을 때, 동일한 값의 요소만 남도록..

[해커랭크] Non-Divisible Subset

[해커랭크] Non-Divisible Subset https://www.hackerrank.com/challenges/non-divisible-subset/problem?isFullScreen=true Non-Divisible Subset | HackerRankFind the size of the maximal non-divisible subset.www.hackerrank.com Given a set of distinct integers, print the size of a maximal subset of where the sum of any numbers in is not evenly divisible by .서로 다른 정수 집합이 주어졌을 때, 의 최대 부분집합의 크기를 출력하는데, 여기서 임..

728x90
반응형
LIST