FizzBuzz

Function Kata „FizzBuzz“ Write a function to return the numbers from 1 to 100. However, some of the numbers should be translated into a string according to these rules [1]: return „Fizz“ for multiples of 3 return „Buzz“ for multiples of 5 return „FizzBuzz“ for...

Count Characters

Function Kata “Count Characters” Write a function to count the number of occurrences of characters in a string. The input to the function is a string, its output a Dictionary (map) of char/int pairs. IDictionary CountCharacters(string input) Processing the string...

To Roman Numerals

Function Kata „To Roman Numerals“ Implement a function that translates a decimal number to roman numerals. Examples: 1 -> „I“ 2 -> „II“ 4 -> „IV“ 5 -> „V“ 9 -> „IX“ 10 -> „X“ 42 -> „XLII“ 99 -> „XCIX“ 2013 -> „MMXIII“ The decimal numbers are...

ToDictionary

Function Kata „ToDictionary“ Implement a function that maps a special formatted string into a dictionary. The function should have the following signature: IDictionary ToDictionary(string input); The following table shows some examples for input strings and the...

Christmas tree

Function Kata „Christmas tree“ Write a function that „draws“ a Christmas tree with ASCII characters (ASCII art). The „picture“should be returned as a collection of strings. See the following example of a tree with height 5: Christmastree.Draw(5) X XXX XXXXX XXXXXXX...

Russian Peasant Multiplication

Function Kata „Russian Peasant Multiplication“ Write a function that multiplies two whole numbers by using the Russian Peasant Multiplication algorithm [1]. The signature of the function should be as follows: int Mul(int x, int y); The algorithm of the Russian Peasant...