Esempio n. 1
0
        static void RunMakingAnagrams()
        {
            var firstString = Console.ReadLine();

            var secondString      = Console.ReadLine();
            var stringManipulator = new StringManipulator();
            int result            = stringManipulator.CountDeletionsToMakeAnagram(firstString, secondString);

            Console.WriteLine(result);
        }
Esempio n. 2
0
        static void RunAlternatingCharacters()
        {
            var testsAmount       = Convert.ToInt32(Console.ReadLine());
            var stringManipulator = new StringManipulator();

            for (var i = 0; i < testsAmount; i++)
            {
                var input = Console.ReadLine();

                int result = stringManipulator.CalculateSymbolsToDeleteAmountToGetFavourableString(input);

                Console.WriteLine(result);
            }
        }