diff --git a/Algorithms/Algorithms.csproj b/Algorithms/Algorithms.csproj index 28974149..0f590484 100644 --- a/Algorithms/Algorithms.csproj +++ b/Algorithms/Algorithms.csproj @@ -1,8 +1,7 @@  - - netcoreapp2.0 + + net7.0 - diff --git a/Algorithms/Strings/Permutations.cs b/Algorithms/Strings/Permutations.cs index fe15d8a9..dd066d09 100644 --- a/Algorithms/Strings/Permutations.cs +++ b/Algorithms/Strings/Permutations.cs @@ -61,9 +61,9 @@ public static HashSet ComputeDistinct(string source) } /// - /// Determines if the Other string is an anargram of the Source string. + /// Determines if the Other string is an anagram of the Source string. /// - public static bool IsAnargram(string source, string other) + public static bool IsAnagram(string source, string other) { if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(other)) return false; @@ -83,7 +83,7 @@ public static bool IsAnargram(string source, string other) } for (int i = 0; i < len; i++) { - // Inputs are not Anargram if characers from *other are not present in *source. + // Inputs are not Anagram if characers from *other are not present in *source. if (!hashSetSourceChars.Contains(other[i])) return false; if (!hashSetOtherChars.Contains(source[i])) return false; } diff --git a/C-Sharp-Algorithms.sln b/C-Sharp-Algorithms.sln index 0206c6d4..704e5e5b 100644 --- a/C-Sharp-Algorithms.sln +++ b/C-Sharp-Algorithms.sln @@ -1,13 +1,13 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26430.6 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataStructures", "DataStructures\DataStructures.csproj", "{A5923854-69FB-4BD0-90E3-702E1D488AFC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataStructures", "DataStructures\DataStructures.csproj", "{A5923854-69FB-4BD0-90E3-702E1D488AFC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Algorithms", "Algorithms\Algorithms.csproj", "{7CE43796-3845-4F4D-9A8D-C09B8552F42E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Algorithms", "Algorithms\Algorithms.csproj", "{7CE43796-3845-4F4D-9A8D-C09B8552F42E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTest", "UnitTest\UnitTest.csproj", "{78061D74-A872-4D4B-AF06-92EAC2EDF185}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "UnitTest\UnitTest.csproj", "{78061D74-A872-4D4B-AF06-92EAC2EDF185}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/DataStructures/DataStructures.csproj b/DataStructures/DataStructures.csproj index 0a534884..893c6769 100644 --- a/DataStructures/DataStructures.csproj +++ b/DataStructures/DataStructures.csproj @@ -1,8 +1,7 @@  - - netcoreapp2.0 + + net7.0 - Never diff --git a/UnitTest/AlgorithmsTests/StringPermutationTests.cs b/UnitTest/AlgorithmsTests/StringPermutationTests.cs index 0e8b8b82..88828e5c 100644 --- a/UnitTest/AlgorithmsTests/StringPermutationTests.cs +++ b/UnitTest/AlgorithmsTests/StringPermutationTests.cs @@ -16,27 +16,27 @@ public static void DoTest() var one = "abcdefg"; var two = "dabcgfe"; - Assert.True(Permutations.IsAnargram(one, two) == true); + Assert.True(Permutations.IsAnagram(one, two) == true); one = "123456"; two = "789123"; - Assert.True(Permutations.IsAnargram(one, two) == false); + Assert.True(Permutations.IsAnagram(one, two) == false); one = "abc"; two = "bbb"; - Assert.True(Permutations.IsAnargram(one, two) == false); + Assert.True(Permutations.IsAnagram(one, two) == false); one = "acdf"; two = "bcde"; - Assert.True(Permutations.IsAnargram(one, two) == false); + Assert.True(Permutations.IsAnagram(one, two) == false); one = "I am legion"; // L is small two = "Legion I am"; // L is capital - Assert.True(Permutations.IsAnargram(one, two) == false); + Assert.True(Permutations.IsAnagram(one, two) == false); one = "I am legion"; // L is small two = "legion I am"; // L is small - Assert.True(Permutations.IsAnargram(one, two) == true); + Assert.True(Permutations.IsAnagram(one, two) == true); } } } diff --git a/UnitTest/UnitTest.csproj b/UnitTest/UnitTest.csproj index ad90fe4a..af813875 100644 --- a/UnitTest/UnitTest.csproj +++ b/UnitTest/UnitTest.csproj @@ -1,21 +1,18 @@  - - netcoreapp2.0 + + net7.0 - - - - + \ No newline at end of file