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<char, int> CountCharacters(string input)...

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<string, string> ToDictionary(string input); The following table shows some examples for input...

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...

ROT-13

Function Kata „ROT-13“ Implement a function that encodes a text by [ROT-13]. The ROT-13 coding exchanges every character by the character 13 positions further back in the alphabet. If the value lies behind the end of the alphabet it is fetched from the beginning....