Exemplo n.º 1
0
        public void SwapWithoutTemp_Smoke_Test()
        {
            int x = 10, y = 5;

            SwapWithoutTemp.Swap(ref x, ref y);

            Assert.AreEqual(5, x);
            Assert.AreEqual(10, y);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var condition = true;

            //just keeping the current solving problem in if condition; nothing else
            if (condition)
            {
                KStacks.MainMethod();
            }
            else
            {
                #region LinkedLists
                LinkIntersection.MainMethod();
                SumList.MainMethod();
                RemoveDups <int> .MainMethod();

                ReturnKthToLast.MainMethod(1);
                DeleteMiddleNode.MainMethod();
                LoopDetection.MainMethod();
                #endregion

                #region Array and Strings
                StringRotation.IsStringRotation("waterbottle", "erbottlewat");
                ZeroMatrixImplementation();
                RotateMatrixImplementation(4);
                StringCompression.CompressedString("aabcccccaaa");
                OneAway.IsStringOneAway("pale", "paled");
                PalindromePermutation.IsPalindromePermutation("Mr. owl ate my Metal worm");
                URLify.URLifyString("Spaces in this string will be replaced by percent20");
                IsStringPermutation.VerifyStringPermutation("abdcdefgh", "aefgb2cdh");
                UniqueString.VerifyUniqueStringAsciiSet("!@#$%$^&*()EFgh");
                HashTableImplentation();
                SwapWithoutTemp.SwapWithoutTempVar(12, 24);
                #endregion
            }
        }