Lonpeach Tech

게임 개발 이슈 정리

[Codewars #23] Sum The Tree (6kyu)

[Codewars #23] Sum The Tree (6kyu) 문제 풀이

Instructions Given a node object representing a binary tree: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Node: value: <int>, left: <Node> o...

[Codewars #22] longest_palindrome (6kyu)

[Codewars #22] longest_palindrome (6kyu) 문제 풀이

Instructions Longest Palindrome Find the length of the longest substring in the given string s that is the same in reverse. As an example, if the input was “I like racecars that go fast”, the su...

[Codewars #21] Parse HTML/CSS Colors (6kyu)

[Codewars #21] Parse HTML/CSS Colors (6kyu) 문제 풀이

Instructions In this kata you parse RGB colors represented by strings. The formats are primarily used in HTML and CSS. Your task is to implement a function which takes a color as a string and retu...

[Codewars #20] Steps in Primes (6kyu)

[Codewars #20] Steps in Primes (6kyu) 문제 풀이

Instructions The prime numbers are not regularly spaced. For example from 2 to 3 the step is 1. From 3 to 5 the step is 2. From 7 to 11 it is 4. Between 2 and 50 we have the following pairs of 2-s...

[Codewars #19] Build Tower (6kyu)

[Codewars #19] Build Tower (6kyu) 문제 풀이

Instructions The prime numbers are not regularly spaced. For example from 2 to 3 the step is 1. From 3 to 5 the step is 2. From 7 to 11 it is 4. Between 2 and 50 we have the following pairs of 2-s...

[Codewars #18] Maximum Length Difference (7kyu)

[Codewars #18] Maximum Length Difference (7kyu) 문제 풀이

Instructions You are given two arrays a1 and a2 of strings. Each string is composed with letters from a to z. Let x be any string in the first array and y be any string in the second array. Find ...

[Codewars #17] Speed Control (7kyu)

[Codewars #17] Speed Control (7kyu) 문제 풀이

Instructions In John’s car the GPS records every s seconds the distance travelled from an origin (distances are measured in an arbitrary but consistent unit). For example, below is part of a recor...

[Codewars #16] Vasya - Clerk (6kyu)

[Codewars #16] Vasya - Clerk (6kyu) 문제 풀이

Instructions The new “Avengers” movie has just been released! There are a lot of people at the cinema box office standing in a huge line. Each of them has a single 100, 50 or 25 dollars bill. An “...

[Codewars #15] Are they the same? (6kyu)

[Codewars #15] Are they the same? (6kyu) 문제 풀이

Instructions Given two arrays a and b write a function comp(a, b) (compSame(a, b) in Clojure) that checks whether the two arrays have the “same” elements, with the same multiplicities. “Same” mean...

[Codewars #14] Sum of a sequence (7kyu)

[Codewars #14] Sum of a sequence (7kyu) 문제 풀이

Instructions Your task is to make function, which returns the sum of a sequence of integers. The sequence is defined by 3 non-negative values: begin, end, step. If begin value is greater than th...