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 · 429 阅读 · 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 · 220 阅读 · 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 · 278 阅读 · 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 · 280 阅读 · 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 · 176 阅读 · 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 · 345 阅读 · 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 · 302 阅读 · 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 · 330 阅读 · 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 · 451 阅读 · 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 · 259 阅读 · 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 · 288 阅读 · 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 · 310 阅读 · 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 · 262 阅读 · 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 · 201 阅读 · 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 · 310 阅读 · 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 · 300 阅读 · 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 · 326 阅读 · 0 评论
分享