2020年4月5日

判断10步能不能回到原点

摘要: 题目描述: # You live in the city of Cartesia where all roads are laid out in a perfect grid.# You arrived ten minutes too early to an appointment, so you 阅读全文

posted @ 2020-04-05 23:09 阿虾 阅读(210) 评论(0) 推荐(0) 编辑

完成方法/函数,以便将破折号/下划线分隔的单词转换为驼峰式大小写

摘要: 题目描述: # Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the output should be 阅读全文

posted @ 2020-04-05 22:06 阿虾 阅读(383) 评论(0) 推荐(0) 编辑

求公共汽车上的人数

摘要: 题目描述: # Number of people in the bus# There is a bus moving in the city, and it takes and drop some people in each bus stop.## You are provided with a 阅读全文

posted @ 2020-04-05 21:12 阿虾 阅读(161) 评论(0) 推荐(0) 编辑

写一个函数,返回不同的计数

摘要: 题目描述: # Write a function that will return the count of distinct# case-insensitive alphabetic characters and numeric digits t# hat occur more than once 阅读全文

posted @ 2020-04-05 20:55 阿虾 阅读(139) 评论(0) 推荐(0) 编辑

对一个数的每一位数字求平方

摘要: 题目描述: # 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 ou 阅读全文

posted @ 2020-04-05 20:16 阿虾 阅读(279) 评论(0) 推荐(0) 编辑

写一个以整数为输入的函数, 并返回二进制中等于1的位的数目

摘要: 题目描述: # Write 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 阅读全文

posted @ 2020-04-05 20:06 阿虾 阅读(470) 评论(0) 推荐(0) 编辑

Array.diff

摘要: 题目描述:# Your goal in this kata is to implement a difference function, which subtracts one list from another and returns the result.## It should remove 阅读全文

posted @ 2020-04-05 19:46 阿虾 阅读(164) 评论(0) 推荐(0) 编辑

ATM机允许4位或6位密码,而密码只能包含4位或6位数字。 如果函数传递了一个有效的PIN字符串,返回true,否则返回false。

摘要: 题目描述: ATM machines allow 4 or 6 digit PIN codes and PIN codes cannot contain anything but exactly 4 digits or exactly 6 digits. If the function is pas 阅读全文

posted @ 2020-04-05 16:34 阿虾 阅读(336) 评论(0) 推荐(0) 编辑

替换字符串中的字符为“(” 或“)”

摘要: 题目描述:# 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 阅读全文

posted @ 2020-04-05 16:33 阿虾 阅读(360) 评论(0) 推荐(0) 编辑

导航