Chester Tang's Blog 
  • Home
  • Archives
  • Categories
  •   
  •   

見習村12 - Greed is Dice

12 - Greed is DiceDon’t say so much, just coding… InstructionGreed is a dice game played with five six-sided dice. Your mission, should you choose to accept it, is to score a throw according to these

2020-09-27
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars

見習村11 - Extract the domain name from a URL

11 - Extract the domain name from a URLDon’t say so much, just coding… InstructionWrite a function that when given a URL as a string, parses out just the domain name and returns it as a string. For ex

2020-09-26
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars

見習村10 - Playing with digits

10 - Playing with digitsDon’t say so much, just coding… InstructionSome numbers have funny properties. For example: 89 –> 8¹ + 9² = 89 * 1 695 –> 6² + 9³ + 5⁴= 1390 = 695 * 2 46288 –> 4³

2020-09-25
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars

見習村09 - Sums of Parts

09 - Sums of PartsDon’t say so much, just coding… InstructionLet us consider this example (array written in general format): ls = [0, 1, 3, 6, 10] Its following parts: 12345678910111213141516171819202

2020-09-24
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars

見習村08 - Mexican Wave

08 - Mexican WaveDon’t say so much, just coding… InstructionIn this simple Kata your task is to create a function that turns a string into a Mexican Wave. You will be passed a string and you must retu

2020-09-23
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars

見習村07 - Sum of Digits / Digital Root

07 - Sum of Digits / Digital RootDon’t say so much, just coding… InstructionDigital 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

2020-09-22
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars

見習村06 - Character with longest consecutive repetition

06 - Character with longest consecutive repetitionDon’t say so much, just coding… InstructionFor a given string s find the character c (or C) with longest consecutive repetition and return: 1[c, l] wh

2020-09-21
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars

見習村05 - The Hashtag Generator

05 - The Hashtag GeneratorDon’t say so much, just coding… InstructionThe marketing team is spending way too much time typing in hashtags.Let’s help them with our own Hashtag Generator! Here’s the deal

2020-09-20
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars

見習村04 - Bit Counting

04 - Bit CountingDon’t say so much, just coding… InstructionWrite a function that takes an integer as input, and returns the number of bits that are equal to one in the binary representation of that n

2020-09-19
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars

見習村03 - Highest Scoring Word

03 - Highest Scoring WordDon’t say so much, just coding… InstructionGiven a string of words, you need to find the highest scoring word. Each letter of a word scores points according to its position in

2020-09-18
12th鐵人賽
12th鐵人賽 刷題見習村 CodeWars
1…45678…13

Search

Copyright © 2021 - Chester Tang.