![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codewars
文章平均质量分 72
HM_773_220
还没毕业于UoA的划水傻瓜
展开
-
[6 kyu] Multi-tap Keypad Text Entry on an Old Mobile Phone
Prior to having fancy iPhones, teenagers would wear out their thumbs sending SMS messages on candybar-shaped feature phones with 3x4 numeric keypads.------- ------- ------- -------| | | AB...原创 2020-03-13 09:21:57 · 304 阅读 · 0 评论 -
[5 kyu] Maximum subarray sum
The maximum sum subarray problem consists in finding the maximum sum of a contiguous subsequence in an array or list of integers:maxSequence([-2, 1, -3, 4, -1, 2, 1, -5, 4])# should be 6: [4, -1, ...原创 2020-03-10 13:04:01 · 153 阅读 · 0 评论 -
[6 kyu] IQ Test
Bob is preparing to pass IQ test. The most frequent task in this test is to find out which one of the given numbers differs from the others. Bob observed that one number usually differs from the othe...原创 2020-03-10 13:02:56 · 211 阅读 · 0 评论 -
[7 kyu] Categorize New Member
The Western Suburbs Croquet Club has two categories of membership, Senior and Open. They would like your help with an application form that will tell prospective members which category they will be p...原创 2020-03-10 13:01:05 · 212 阅读 · 0 评论 -
[6 kyu] Unique In Order
Implement the function unique_in_order which takes as argument a sequence and returns a list of items without any elements with the same value next to each other and preserving the original order of ...原创 2020-03-10 12:58:20 · 117 阅读 · 0 评论 -
[6 kyu] Highest Scoring Word
Given a string of words, you need to find the highest scoring word. Each letter of a word scores points according to its position in the alphabet: a = 1, b = 2, c = 3 etc.You need to return the hi...原创 2020-03-10 12:57:10 · 247 阅读 · 0 评论 -
[6 kyu] Are they the "same"?
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” means, here, that th...原创 2020-03-10 12:55:43 · 230 阅读 · 0 评论 -
[7 kyu] You're a square!
A square of squaresYou like building blocks. You especially like building blocks that are squares. And what you even like more, is to arrange them into a square of square building blocks!However, s...原创 2020-03-10 12:49:11 · 223 阅读 · 0 评论 -
[7 kyu] Square Every Digit
Welcome. In this kata, you are asked to square every digit of a number.For example, if we run 9119 through the function, 811181 will come out, because 92 is 81 and 12 is 1.Note: The function a...原创 2020-03-10 12:45:51 · 354 阅读 · 0 评论 -
[6 kyu] Sort the odd
You have an array of numbers. Your task is to sort ascending odd numbers but even numbers must be on their places.Note: Zero isn’t an odd number and you don’t need to move it. If you have an emp...原创 2020-03-10 12:43:47 · 188 阅读 · 0 评论 -
[8 kyu] Remove First and Last Character
It’s pretty straightforward. Your goal is to create a function that removes the first and last characters of a string. You’re given one parameter, the original string. You don’t have to worry with st...原创 2020-03-10 12:40:56 · 202 阅读 · 0 评论 -
[7 kyu] Disemvowel Trolls
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 functi...原创 2020-03-09 23:17:40 · 235 阅读 · 0 评论 -
[6 kyu] Duplicate Encoder
The goal of this exercise is to convert a string to a new string where each character in the new string is “(” if that character appears only once in the original string, or “)” if that character app...原创 2020-03-09 23:14:48 · 172 阅读 · 0 评论 -
[6 kyu] Who likes it?
You probably know the “like” system from Facebook and other pages. People can “like” blog posts, pictures or other items. We want to create the text that should be displayed next to such an item.I...原创 2020-03-09 23:12:34 · 139 阅读 · 0 评论 -
[6 kyu] Your order, please
Your task is to sort a given string. Each word in the string will contain a single number. This number is the position the word should have in the result.Note: Numbers can be from 1 to 9. So 1 will ...原创 2020-03-09 23:09:43 · 242 阅读 · 0 评论 -
[7 kyu] Exes and Ohs
Check to see if a string has the same amount of 'x’s and 'o’s. The method must return a boolean and be case insensitive. The string can contain any char.Examples input/output:XO("ooxx") => tr...原创 2020-03-09 23:07:17 · 227 阅读 · 0 评论 -
[8 kyu] Multiply
The question is for register the webpage. With just a simple describe to let you find the mistake and change it.The code does not execute properly. Try to figure out why.The solution is :def mult...原创 2020-03-09 23:04:14 · 250 阅读 · 0 评论