public static void Main(string[] args)
        {
            Console.WriteLine(Kata.DuplicateEncode("Success")); //  )())())
            Console.WriteLine(Kata.DuplicateEncode("recEde"));  // ()()()
            Console.WriteLine(Kata.DuplicateEncode("din"));     // (((
            Console.WriteLine(Kata.DuplicateEncode("(( @"));    // ))((
            Console.WriteLine(Kata.DuplicateEncode("((  @@"));  // ))))))
            Console.WriteLine(Kata.DuplicateEncode("DoWnY"));   // (((((

            /*
             * EXAMPLE => "Success"
             *      => the letter 's' is more than once because the letter 's' is in 3 places that is in [0], [5], and [6]     [0] = ) [5] = ) [6] = )
             *      => the letter 'u' is just once because the letter 'u' is just in 1 place that is in [1]      [1] = (
             *      => the letter 'c' is more than once because the letter 'c' is in 2 places that is in [2] and [3]      [2] = ) [3] = )
             *      => the letter 'e' is juts once because the letter 'e' is just in 1 place that is in [4]      [4] = (
             *
             *      so, the result is [0][1][2][3][4][5][6] = )())())
             */
        }
Ejemplo n.º 2
0
 private static void Main(string[] args)
 {
     Console.WriteLine(Kata.DuplicateEncode("Success"));
     Console.ReadLine();
 }