
Kata
Pelva
这个作者很懒,什么都没留下…
展开
-
[Kata 7 C#] Sum of a Beach
描述计算一个句子里"Sand", “Water”, “Fish”, 和 “Sun” 的出现次数,忽略大小写Beaches are filled with sand, water, fish, and sun. Given a string, calculate how many times the words “Sand”, “Water”, “Fish”, and “Sun” appear without overlapping (regardless of the case).ExamplesS原创 2022-01-19 09:56:28 · 298 阅读 · 0 评论 -
[Kata 7 C#] List Filtering过滤列表
问题描述一个List里有非负的整数 和字符串,把里面的数字过滤出来,形成一个新的List。ListFilterer.GetIntegersFromList(new List<object>(){1, 2, "a", "b"}) => {1, 2}ListFilterer.GetIntegersFromList(new List<object>(){1, 2, "a", "b", 0, 15}) => {1, 2, 0, 15}ListFilterer.GetInt原创 2022-01-18 09:07:50 · 1773 阅读 · 0 评论 -
[Kata 7 C++]Row Weights
描述ScenarioSeveral people are standing in a row divided into two teams.The first person goes into team 1, the second goes into team 2, the third goes into team 1, and so on.TaskGiven an array of positive integers (the weights of the people), return a n原创 2022-01-17 17:57:52 · 131 阅读 · 0 评论 -
[Kata 7 C++]Alphabetical Grid
描述You need to write a function grid that returns an alphabetical grid of size NxN, where a = 0, b = 1, c = 2…Examples:grid(4)a b c db c d ec d e fd e f ggrid(10)a b c d e f g h i jb c d e f g h i j kc d e f g h i j k ld e f g h i j k l me f g原创 2022-01-17 17:31:22 · 161 阅读 · 0 评论 -
[Kata 7 C++]Compare Strings by Sum of Chars
描述Compare two strings by comparing the sum of their values (ASCII character code).For comparing treat all letters as UpperCasenull/NULL/Nil/None should be treated as empty stringsIf the string contains other characters than letters, treat the whole str原创 2022-01-17 15:14:46 · 179 阅读 · 0 评论 -
[Kata 7 C++]Shortest Word
描述Simple, given a string of words, return the length of the shortest word(s).String will never be empty and you do not need to account for different data types.测试用例#include <iostream>#include <string>#include <vector>#include <r原创 2022-01-17 13:54:12 · 317 阅读 · 0 评论 -
[Kata 7 C++]Binary Addition
描述Implement a function that adds two numbers together and returns their sum in binary. The conversion can be done before, or after the addition.The binary number returned should be a string.Examples:(Input1, Input2 --> Output (explanation)))1, 1 --&原创 2022-01-17 11:40:50 · 528 阅读 · 0 评论 -
[Kata 8 C++]Switch it Up 数字转换
描述When provided with a number between 0-9, return it in words.Input :: 1Output :: “One”.If your language supports it, try using a switch statement.这个题很简单,但人们不按套路出牌测试用例#include <string>#include <random>Describe(Switch_it_Up){ It(Fi原创 2022-01-17 10:37:01 · 400 阅读 · 0 评论 -
[Kata 8 C++]Correct the mistakes of the character recognition software
问题描述Character recognition software is widely used to digitise printed texts. Thus the texts can be edited, searched and stored on a computer.When documents (especially pretty old ones written with a typewriter), are digitised character recognition softwa原创 2022-01-17 10:06:17 · 457 阅读 · 0 评论 -
C#运行时创建类
Kata的练习题using System;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.Reflection.Emit;public static class Kata{ public static bool DefineClass(string className, Dictionary<string, Type> properties.原创 2020-05-26 11:24:17 · 576 阅读 · 0 评论