## [CodeWars] Decode the Morse Code

Part of Series 1/3This kata is part of a series on the Morse code. After you solve this kata, you may move to the next one.
In this kata you have to write a simple Morse code decoder. While the Morse code is now mostly superceded by voice and digital data communication channels, it still has its use in some applications around the world.

더 보기

## [CodeWars] Find the Parity Outlier

You are given an array (which will have a length of at least 3, but could be very large) containing integers. The array is either entirely comprised of odd integers or entirely comprised of even integers except for a single integer `N`. Write a method that takes the array as an argument and returns this “outlier” `N`.

계속 “[CodeWars] Find the Parity Outlier” 읽기

## [CodeWars] Sum of Digits / Digital Root

In this kata, you must create a `digital root` function.

A digital root is the recursive sum of all the digits in a number. Given n, take the sum of the digits of n. If that value has two digits, continue reducing in this way until a single-digit number is produced. This is only applicable to the natural numbers.

More

## 피보나치 수열이란?

• 첫 달에는 새로 태어난 토끼 한 쌍만이 존재한다.
• 두 달 이상이 된 토끼는 번식 가능하다.
• 번식 가능한 토끼 한 쌍은 매달 새끼 한 쌍을 낳는다.
• 토끼는 죽지 않는다.

다음과 같은 조건이 있을 때, N개월 뒤에는 토끼가 얼마나 있을까?

1202년, 이탈리아의 수학자 레오나르도 피보나치가 토끼의 번식을 언급하면서 체계화 한 수열을 피보나치 수열이라고 한다.

피보나치 수열의 점화식은 다음과 같다.

F0​=0, F1​=1, Fn+2​=Fn+1​+Fn

점화식이 다음과 같다면, 코드로 옮기는 것은 생각보다 쉽다. n = 0이라면 0을 리턴, n = 1인 경우 1을 리턴하고, 그 외의 경우에는 F(n-1)+F(n-2)를 리턴하면 된다.

계속 읽기

## [CodeWars] Playing with digits

Some numbers have funny properties. For example:

89 –> 8¹ + 9² = 89 * 1

695 –> 6² + 9³ + 5⁴= 1390 = 695 * 2

46288 –> 4³ + 6⁴+ 2⁵ + 8⁶ + 8⁷ = 2360688 = 46288 * 51

Given a positive integer n written as abcd… (a, b, c, d… being digits) and a positive integer p we want to find a positive integer k, if it exists, such as the sum of the digits of n taken to the successive powers of p is equal to k * n. In other words:

Is there an integer k such as : (a ^ p + b ^ (p+1) + c ^(p+2) + d ^ (p+3) + …) = n * k

If it is the case we will return k, if not return -1.

More

## [자료구조] 큐

FIFO(First In First Out)의 대표적인 자료 구조

You are going to be given an array of integers. Your job is to take that array and find an index N where the sum of the integers to the left of N is equal to the sum of the integers to the right of N. If there is no index that would make this happen, return `-1`.