Aracade Intro #23 boxBlur. Algorithm, 알고리즘, Codefights, CodeSignal, regx, 정규표현식, 코드파이트, 코드시그널, c++ java c# scalar
Aracade Intro #23 boxBlur. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar Q. Last night you partied a little too hard. Now there's a black and white photo of you that's about to go viral! You can't let this ruin your reputation, so you want to apply the box blur algorithm to the photo to hide its content. The pixels in the input image are represented as integers. The a..
Aracade Intro #22 avoidObstacles. Algorithm, 알고리즘, Codefights, CodeSignal, regx, 정규표현식, 코드파이트, 코드시그널, c++ java c# scalar
Aracade Intro #22 avoidObstacles. Algorithm, Codefights, CodeSignal, regx, 정규표현식, 코드파이트, 코드시그널, c++ java c# scalar Q. You are given an array of integers representing coordinates of obstacles situated on a straight line. Assume that you are jumping from the point with coordinate 0 to the right. You are allowed only to make jumps of the same length represented by some integer. Find the minimal len..
Aracade Intro #21 isIPv4Address. Algorithm, 알고리즘, Codefights, CodeSignal, regx, 정규표현식, 코드파이트, 코드시그널, c++ java c# scalar
Aracade Intro #21 isIPv4Address. Algorithm, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar Q. An IP address is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. There are two versions of the Internet protocol, and thus two versions of addresses. One of them is the IPv4 address. IP주소..
Aracade Intro #20 arrayMaximalAdjacentDifference. Algorithm, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar
Aracade Intro #20 arrayMaximalAdjacentDifference. Algorithm, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar Q.Given an array of integers, find the maximal absolute difference between any two of its adjacent elements. 주어진 정수 배열 중에서, 인접한 정수끼리 최대의 차이값(절대값) 을 구하여라 e.g.Input -> inputArray = [2, 4, 1, 0]Output -> arrayMaximalAdjacentDifference(inputArray) = 3. ? index 1, 2 -> 4 and 1 -> 3 //..
Aracade Intro #19 AreEquallyStrong. Algorithm, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar
Aracade Intro #19 AreEquallyStrong. Algorithm, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar Q. Call two arms equally strong if the heaviest weights they each are able to lift are equal. Call two people equally strong if their strongest arms are equally strong (the strongest arm can be both the right and the left), and so are their weakest arms. Given your and your friend's arms' lift..
Aracade Intro #18 PalindromeRearranging, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar
Aracade Intro #18 PalindromeRearranging, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar Given a string, find out if its characters can be rearranged to form a palindrome. 주어진 문자열이, 회문(중간을 기준으로 대칭)자가 될수 있는지 확인한다. e.g. abcba / 다시합창합시다 / bbbbcddcbbbb / 말해말 Input -> "aabb"Output -> palindromeRearranging(inputString) = true We can rearrange "aabb" to make "abba", which is a palindrome. //Pr..
Aracade Intro #17 ArrayChange, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar
Aracade Intro #17 ArrayChange, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar Q. You are given an array of integers. On each move you are allowed to increase exactly one of its element by one. Find the minimal number of moves required to obtain a strictly increasing sequence from the input. 정수 배열을 입력받고, 인덱스 순서로 따라올라가는데.. 한 행동에 한개의 숫자 1씩을 증가시킬수 있다. 전부 오름차순이 되도록 해야된다. 전부 오름차순이 되는데 움직인 개수..
Aracade Intro #16 AreSimilar?, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar
Aracade Intro #16 AreSimilar?, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar Q. Two arrays are called similar if one can be obtained from another by swapping at most one pair of elements in one of the arrays. Given two arrays a and b, check whether they are similar. 입력받은 두개의 배열 (a, b) 중에서, 어느 한개의 배열에서 한 쌍의 요소들 자리만 바꿔서 (위치는 서로 떨어져 있어도 상관없음) a, b 배열이 같아지면, 비슷하다는 것이 true 이다. e.g. Input -..