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 } }
public void Test_NotPalindromePermutation_Success(string input) { var actual = PalindromePermutation.IsPalindromePermutation(input); Assert.IsFalse(actual); }
public void shouldReturnTrueWhenLengthRemovingSpacesIsOddAndOnlyOneCharacterCountIsOdd() { string permutation = "a bc dcb a"; Assert.True(PalindromePermutation.IsPalindromePermutation(permutation)); }
public void shouldReturnFalseWhenLengthRemovingSpacesIsOddAndThereIsNotOneOddCharacterCounts() { string permutation = "a b ccbacb"; Assert.False(PalindromePermutation.IsPalindromePermutation(permutation)); }