본문 바로가기

프로그래머5

[CodeWars] javascript - 6kyu - Difference of 2 문제풀이 Title Difference of 2 Description The objective is to return all pairs of integers from a given array of integers that have a difference of 2. The result array should be sorted in ascending order of values. Assume there are no duplicate integers in the array. The order of the integers in the input array should not matter. Examples [1, 2, 3, 4] should return [[1, 3], [2, 4]] [4, 1, 2, 3] should a.. 2020. 5. 6.
[CodeWars] javascript - 7kyu - Vowel Count 문제풀이 Title Vowel Count Description Return the number (count) of vowels in the given string. We will consider a, e, i, o, and u as vowels for this Kata. The input string will only consist of lower case letters and/or spaces. How Can I Solved 문제 요구사항 정의 함수의 인자로 문자열이 주어진다. 문자열 중에서 모음의 갯수를 구해서 반환한다. 만약, 문자열에 모음이 없는 경우에는 0을 반환한다. 모음의 종류 a, e, o, u, i 문제 접근 문제를 푸는 방법에는 크게 2가지가 있다. split() 메서드로 문자열을 나누고, in.. 2020. 5. 1.
[CodeWars] javascript - 6kyu - Replace With Alphabet Position 문제풀이 Title Replace With Alphabet Position DescriptionWelcome. In this kata you are required to, given a string, replace every letter with its position in the alphabet. If anything in the text isn't a letter, ignore it and don't return it. "a" = 1, "b" = 2, etc. Example alphabetPosition("The sunset sets at twelve o' clock.") Should return "20 8 5 19 21 14 19 5 20 19 5 20 19 1 20 20 23 5 12.. 2020. 4. 29.
[CodeWars] javascript - 7kyu - Disemvowel Trolls 문제풀이 Title Disemvowel Trolls Description Trolls are attacking your comment section! A common way to deal with this situation is to remove all of the vowels from the trolls' comments, neutralizing the threat. Your task is to write a function that takes a string and return a new string with all vowels removed. For example, the string "This website is for losers LOL!" would become "Ths wbst s fr lsrs LL.. 2020. 4. 27.
반응형