![](https://img-blog.csdnimg.cn/20190918135101160.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Codewars
文章平均质量分 92
分享Codewars刷过的有趣的题目
AidenLau
新加坡国立人工智能硕士在读
展开
-
Calculator (Codewars 3kyu Java)
题目:Create a simple calculator that given a string of operators (), +, -, *, / and numbers separated by spaces returns the value of that expressionExample:Calculator.evaluate(“2 / 2 + 3 * 4 - 6”) //...原创 2020-04-01 14:06:18 · 422 阅读 · 0 评论 -
Pyramid Slide Down (Codewars 4kyu Python)
题目:Lyrics…Pyramids are amazing! Both in architectural and mathematical sense. If you have a computer, you can mess with pyramids even if you are not in Egypt at the time. For example, let’s consider...原创 2020-03-09 23:17:09 · 877 阅读 · 0 评论 -
Decode the Morse code, advanced (Codewars 4kyu Python)
题目:In this kata you have to write a Morse code decoder for wired electrical telegraph.Electric telegraph is operated on a 2-wire line with a key that, when pressed, connects the wires together, whic...原创 2020-03-08 14:56:04 · 1355 阅读 · 1 评论 -
Range Extraction (Codewars 4kyu Python)
题目:A format for expressing an ordered list of integers is to use a comma separated list of eitherindividual integersor a range of integers denoted by the starting integer separated from the end int...原创 2020-03-07 20:39:14 · 517 阅读 · 0 评论 -
Square into Squares. Protect trees! (Codewars 4kyu Python)
题目:My little sister came back home from school with the following task: given a squared sheet of paper she has to cut it in pieces which, when assembled, give squares the sides of which form an incre...原创 2020-03-07 17:58:06 · 999 阅读 · 0 评论 -
Strip Comments (Codewars 4kyu Python)
题目:Complete the solution so that it strips all text that follows any of a set of comment markers passed in. Any whitespace at the end of the line should also be stripped out.Example:Given an input ...原创 2020-03-06 14:24:35 · 730 阅读 · 0 评论 -
Sudoku Solution Validator (Codewars 4kyu Python)
题目:Sudoku BackgroundSudoku is a game played on a 9x9 grid. The goal of the game is to fill all cells of the grid with digits from 1 to 9, so that each column, each row, and each of the nine 3x3 sub-...原创 2020-03-06 01:03:13 · 743 阅读 · 0 评论 -
Snail Sort (Codewars 4kyu Python)
题目:Given an n x n array, return the array elements arranged from outermost elements to the middle element, traveling clockwise.array = [[1,2,3],[4,5,6],[7,8,9]]snail(array) #=> [1,2,3,6,9,8,7,...原创 2020-03-05 20:05:06 · 663 阅读 · 0 评论 -
Human readable duration format (Codewars 4kyu Python)
题目:Your task in order to complete this Kata is to write a function which formats a duration, given as a number of seconds, in a human-friendly way.The function must accept a non-negative integer. If...原创 2020-03-05 17:09:46 · 614 阅读 · 1 评论