From 11da99f72bc57e2855c39ba9e430622870ef1f46 Mon Sep 17 00:00:00 2001 From: Dalfonso06 Date: Mon, 26 Sep 2022 14:11:25 -0400 Subject: [PATCH 01/11] Update Documentation --- Algorithms/Search/BinarySearcher.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Algorithms/Search/BinarySearcher.cs b/Algorithms/Search/BinarySearcher.cs index 65ab8fb5..d1def0a4 100644 --- a/Algorithms/Search/BinarySearcher.cs +++ b/Algorithms/Search/BinarySearcher.cs @@ -3,16 +3,17 @@ namespace Algorithms.Search { /// - /// TODO. + /// Binary Searcher checks an array for element specified by checking + /// if element is greater or less than the half being checked. + /// time complexity: O(log(n)), + /// space complexity: O(1). + /// Note: Array is sorted before hand. /// - /// TODO. 2. + /// Type of element stored inside array. 2. public class BinarySearcher where T : IComparable { /// - /// Finds index of item in array that equals to item searched for, - /// time complexity: O(log(n)), - /// space complexity: O(1), - /// where n - array size. + /// Finds index of an array by using binary search. /// /// Sorted array to search in. /// Item to search for. From 01be764631fbb7ae46d94b3abf987e056c5861e8 Mon Sep 17 00:00:00 2001 From: Dalfonso06 Date: Mon, 26 Sep 2022 18:04:35 -0400 Subject: [PATCH 02/11] Update Documentation --- Algorithms/Algorithms.csproj | 3 +++ Algorithms/Numeric/GaussJordanElimination.cs | 2 +- Algorithms/Strings/Palindrome.cs | 20 +++++++++++++++----- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Algorithms/Algorithms.csproj b/Algorithms/Algorithms.csproj index 2293f466..5ffed7a5 100644 --- a/Algorithms/Algorithms.csproj +++ b/Algorithms/Algorithms.csproj @@ -28,4 +28,7 @@ + + + diff --git a/Algorithms/Numeric/GaussJordanElimination.cs b/Algorithms/Numeric/GaussJordanElimination.cs index 546969fb..27a54dd8 100644 --- a/Algorithms/Numeric/GaussJordanElimination.cs +++ b/Algorithms/Numeric/GaussJordanElimination.cs @@ -3,7 +3,7 @@ namespace Algorithms.Numeric { /// - /// TODO. + /// Algorithm used to find the inverse of any matrix that can be inverted. /// public class GaussJordanElimination { diff --git a/Algorithms/Strings/Palindrome.cs b/Algorithms/Strings/Palindrome.cs index ddb8632e..e8b37e2a 100644 --- a/Algorithms/Strings/Palindrome.cs +++ b/Algorithms/Strings/Palindrome.cs @@ -4,22 +4,32 @@ namespace Algorithms.Strings { /// - /// TODO. + /// Palindrome a series of characters or a string that when reversed, + /// equals the original string. /// public static class Palindrome { /// - /// TODO. + /// Function to check if a string is a palindrome. /// - /// TODO. 2. - /// TODO. 3. + /// String being checked. 2. + /// Return a boolean if string was a palindrome. 3. public static bool IsStringPalindrome(string word) => TypifyString(word).Equals(TypifyString(ReverseString(word))); - // Typify string to lower and remove white spaces. + /// + /// Typify string to lower and remove white spaces. + /// + /// String to remove spaces. + /// Returns original string without spaces. private static string TypifyString(string word) => Regex.Replace(word.ToLowerInvariant(), @"\s+", string.Empty); + /// + /// Helper function that returns a reversed string inputed. + /// + /// String to be reversed. + /// Returns s reversed. private static string ReverseString(string s) { var arr = s.ToCharArray(); From f181030d71c3a7b82c3125a1895dc644b0e376ce Mon Sep 17 00:00:00 2001 From: Dalfonso06 Date: Mon, 26 Sep 2022 18:18:42 -0400 Subject: [PATCH 03/11] Clean up --- Algorithms/Algorithms.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/Algorithms/Algorithms.csproj b/Algorithms/Algorithms.csproj index 5ffed7a5..2293f466 100644 --- a/Algorithms/Algorithms.csproj +++ b/Algorithms/Algorithms.csproj @@ -28,7 +28,4 @@ - - - From 51a6b2fe0e3874b1c659319b2a65ead7850fb515 Mon Sep 17 00:00:00 2001 From: Andrii Siriak Date: Tue, 27 Sep 2022 20:04:04 +0300 Subject: [PATCH 04/11] Apply suggestions from code review --- Algorithms/Search/BinarySearcher.cs | 2 +- Algorithms/Strings/Palindrome.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Algorithms/Search/BinarySearcher.cs b/Algorithms/Search/BinarySearcher.cs index d1def0a4..4ff4234e 100644 --- a/Algorithms/Search/BinarySearcher.cs +++ b/Algorithms/Search/BinarySearcher.cs @@ -7,7 +7,7 @@ namespace Algorithms.Search /// if element is greater or less than the half being checked. /// time complexity: O(log(n)), /// space complexity: O(1). - /// Note: Array is sorted before hand. + /// Note: Array must be sorted beforehand. /// /// Type of element stored inside array. 2. public class BinarySearcher where T : IComparable diff --git a/Algorithms/Strings/Palindrome.cs b/Algorithms/Strings/Palindrome.cs index e8b37e2a..7d88f077 100644 --- a/Algorithms/Strings/Palindrome.cs +++ b/Algorithms/Strings/Palindrome.cs @@ -12,8 +12,7 @@ public static class Palindrome /// /// Function to check if a string is a palindrome. /// - /// String being checked. 2. - /// Return a boolean if string was a palindrome. 3. + /// String being checked. public static bool IsStringPalindrome(string word) => TypifyString(word).Equals(TypifyString(ReverseString(word))); From 23faf62f11e5bbe658d775e3c3f150679b0d85aa Mon Sep 17 00:00:00 2001 From: Dalfonso06 Date: Wed, 26 Oct 2022 19:00:46 -0400 Subject: [PATCH 05/11] breadth first tree traversal init --- .../Graph/BreadthFirstTreeTraversalTests.cs | 27 ++++++++++ Algorithms/Algorithms.csproj | 8 +++ Algorithms/Algorithms.sln | 25 ++++++++++ Algorithms/Graph/BreadthFirstTreeTraversal.cs | 50 +++++++++++++++++++ .../Dijkstra/DijkstraAlgorithm.cs | 0 .../Dijkstra/DistanceModel.cs | 0 .../BinarySearchTree/BinarySearchTree.cs | 42 ++++++++-------- 7 files changed, 131 insertions(+), 21 deletions(-) create mode 100644 Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs create mode 100644 Algorithms/Algorithms.sln create mode 100644 Algorithms/Graph/BreadthFirstTreeTraversal.cs rename Algorithms/Graph/{ => BreadthFirstTreeTraversal}/Dijkstra/DijkstraAlgorithm.cs (100%) rename Algorithms/Graph/{ => BreadthFirstTreeTraversal}/Dijkstra/DistanceModel.cs (100%) diff --git a/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs b/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs new file mode 100644 index 00000000..34899f07 --- /dev/null +++ b/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs @@ -0,0 +1,27 @@ +using Algorithms.Graph; +using NUnit.Framework; +using DataStructures.BinarySearchTree; +using System; + +namespace Algorithms.Tests.Graph +{ + public static class BreadthFirstTreeTraversalTests + { + [Test] + [TestCase(new int[] { 5, 4, 6 })] + public static void levelOrderTraversal_TrueExpected(int[] path) + { + // Set up binary search tree + BinarySearchTree testTree = new BinarySearchTree(); + foreach (int data in path) + { + testTree.Add(data); + } + int[] levelOrder = BreadthFirstTreeTraversal.LevelOrderTraversal(testTree); + + // Assert + Assert.AreEqual(levelOrder, path); + } + } +} + diff --git a/Algorithms/Algorithms.csproj b/Algorithms/Algorithms.csproj index 9d3f6252..2b92d639 100644 --- a/Algorithms/Algorithms.csproj +++ b/Algorithms/Algorithms.csproj @@ -28,4 +28,12 @@ + + + + + + + + diff --git a/Algorithms/Algorithms.sln b/Algorithms/Algorithms.sln new file mode 100644 index 00000000..5dabfb31 --- /dev/null +++ b/Algorithms/Algorithms.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 25.0.1703.5 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Algorithms", "Algorithms.csproj", "{C2FEFDE9-796C-46D7-8C98-5CC83034083D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C2FEFDE9-796C-46D7-8C98-5CC83034083D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2FEFDE9-796C-46D7-8C98-5CC83034083D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2FEFDE9-796C-46D7-8C98-5CC83034083D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2FEFDE9-796C-46D7-8C98-5CC83034083D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AE3DA0BB-8576-4386-8DDF-90DD2DF693D1} + EndGlobalSection +EndGlobal diff --git a/Algorithms/Graph/BreadthFirstTreeTraversal.cs b/Algorithms/Graph/BreadthFirstTreeTraversal.cs new file mode 100644 index 00000000..b58b4d30 --- /dev/null +++ b/Algorithms/Graph/BreadthFirstTreeTraversal.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using DataStructures.BinarySearchTree; + +namespace Algorithms.Graph +{ + /// + /// Breadth first tree traversal traverses through a binary tree + /// by iterating through each level first. + /// + /// Type of key held in binary search tree. + public static class BreadthFirstTreeTraversal + { + /// + /// Level Order Traversal returns an array of integers in order + /// of each level of a binary tree. It uses a queue to iterate + /// through each node following breadth first search traversal. + /// + /// Passes the binary tree to traverse. + /// Returns level order traversal. + public static TKey[] LevelOrderTraversal(BinarySearchTree tree) + { + BinarySearchTreeNode? root = tree.Root; + TKey[] levelOrder = new TKey[tree.Count]; + if (root is null) + { + return Array.Empty(); + } + + Queue> breadthTraversal = new Queue>(); + breadthTraversal.Enqueue(root); + for (int i = 0; i < levelOrder.Length; i++) + { + BinarySearchTreeNode current = breadthTraversal.Dequeue(); + levelOrder[i] = current.Key; + if (current.Left is not null) + { + breadthTraversal.Enqueue(current.Left); + } + + if (current.Right is not null) + { + breadthTraversal.Enqueue(current.Right); + } + } + + return levelOrder; + } + } +} diff --git a/Algorithms/Graph/Dijkstra/DijkstraAlgorithm.cs b/Algorithms/Graph/BreadthFirstTreeTraversal/Dijkstra/DijkstraAlgorithm.cs similarity index 100% rename from Algorithms/Graph/Dijkstra/DijkstraAlgorithm.cs rename to Algorithms/Graph/BreadthFirstTreeTraversal/Dijkstra/DijkstraAlgorithm.cs diff --git a/Algorithms/Graph/Dijkstra/DistanceModel.cs b/Algorithms/Graph/BreadthFirstTreeTraversal/Dijkstra/DistanceModel.cs similarity index 100% rename from Algorithms/Graph/Dijkstra/DistanceModel.cs rename to Algorithms/Graph/BreadthFirstTreeTraversal/Dijkstra/DistanceModel.cs diff --git a/DataStructures/BinarySearchTree/BinarySearchTree.cs b/DataStructures/BinarySearchTree/BinarySearchTree.cs index b5138966..70a416a9 100644 --- a/DataStructures/BinarySearchTree/BinarySearchTree.cs +++ b/DataStructures/BinarySearchTree/BinarySearchTree.cs @@ -24,20 +24,20 @@ public class BinarySearchTree private readonly Comparer comparer; /// - /// The root of the BST. + /// Gets the root of the BST. /// - private BinarySearchTreeNode? root; + public BinarySearchTreeNode? Root { get; private set; } public BinarySearchTree() { - root = null; + Root = null; Count = 0; comparer = Comparer.Default; } public BinarySearchTree(Comparer customComparer) { - root = null; + Root = null; Count = 0; comparer = customComparer; } @@ -56,13 +56,13 @@ public BinarySearchTree(Comparer customComparer) /// public void Add(TKey key) { - if (root is null) + if (Root is null) { - root = new BinarySearchTreeNode(key); + Root = new BinarySearchTreeNode(key); } else { - Add(root, key); + Add(Root, key); } Count++; @@ -86,14 +86,14 @@ public void AddRange(IEnumerable keys) /// /// The key to search for. /// The node with the specified key if it exists, otherwise a default value is returned. - public BinarySearchTreeNode? Search(TKey key) => Search(root, key); + public BinarySearchTreeNode? Search(TKey key) => Search(Root, key); /// /// Checks if the specified key is in the BST. /// /// The key to search for. /// true if the key is in the BST, false otherwise. - public bool Contains(TKey key) => Search(root, key) is not null; + public bool Contains(TKey key) => Search(Root, key) is not null; /// /// Removes a node with a key that matches . @@ -102,12 +102,12 @@ public void AddRange(IEnumerable keys) /// true if the removal was successful, false otherwise. public bool Remove(TKey key) { - if (root is null) + if (Root is null) { return false; } - var result = Remove(root, root, key); + var result = Remove(Root, Root, key); if (result) { Count--; @@ -122,12 +122,12 @@ public bool Remove(TKey key) /// The node if possible, a default value otherwise. public BinarySearchTreeNode? GetMin() { - if (root is null) + if (Root is null) { return default; } - return GetMin(root); + return GetMin(Root); } /// @@ -136,31 +136,31 @@ public bool Remove(TKey key) /// The node if possible, a default value otherwise. public BinarySearchTreeNode? GetMax() { - if (root is null) + if (Root is null) { return default; } - return GetMax(root); + return GetMax(Root); } /// /// Returns all the keys in the BST, sorted In-Order. /// /// A list of keys in the BST. - public ICollection GetKeysInOrder() => GetKeysInOrder(root); + public ICollection GetKeysInOrder() => GetKeysInOrder(Root); /// /// Returns all the keys in the BST, sorted Pre-Order. /// /// A list of keys in the BST. - public ICollection GetKeysPreOrder() => GetKeysPreOrder(root); + public ICollection GetKeysPreOrder() => GetKeysPreOrder(Root); /// /// Returns all the keys in the BST, sorted Post-Order. /// /// A list of keys in the BST. - public ICollection GetKeysPostOrder() => GetKeysPostOrder(root); + public ICollection GetKeysPostOrder() => GetKeysPostOrder(Root); /// /// Recursive method to add a key to the BST. @@ -261,7 +261,7 @@ private bool Remove(BinarySearchTreeNode? parent, BinarySearchTreeNode(predecessorNode.Key) { Left = node.Left, @@ -271,9 +271,9 @@ private bool Remove(BinarySearchTreeNode? parent, BinarySearchTreeNode Date: Thu, 27 Oct 2022 10:34:30 -0400 Subject: [PATCH 06/11] Added breadth first tree traversal --- .../Graph/BreadthFirstTreeTraversalTests.cs | 76 +++++++++++++++++-- Algorithms/Algorithms.csproj | 6 +- Algorithms/Graph/BreadthFirstTreeTraversal.cs | 40 ++++++++++ .../Dijkstra/DijkstraAlgorithm.cs | 0 .../Dijkstra/DistanceModel.cs | 0 5 files changed, 113 insertions(+), 9 deletions(-) rename Algorithms/Graph/{BreadthFirstTreeTraversal => }/Dijkstra/DijkstraAlgorithm.cs (100%) rename Algorithms/Graph/{BreadthFirstTreeTraversal => }/Dijkstra/DistanceModel.cs (100%) diff --git a/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs b/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs index 34899f07..515c8c71 100644 --- a/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs +++ b/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs @@ -8,19 +8,85 @@ namespace Algorithms.Tests.Graph public static class BreadthFirstTreeTraversalTests { [Test] - [TestCase(new int[] { 5, 4, 6 })] - public static void levelOrderTraversal_TrueExpected(int[] path) + public static void CorrectLevelOrderTraversal() { - // Set up binary search tree + // Arrange + int[] correctPath = { 7, 4, 13, 2, 5, 11, 15, 14, 16 }; + int[] insertionOrder = { 7, 13, 11, 15, 14, 4, 5, 16, 2 }; BinarySearchTree testTree = new BinarySearchTree(); - foreach (int data in path) + foreach (int data in insertionOrder) { testTree.Add(data); } + + // Act + int[] levelOrder = BreadthFirstTreeTraversal.LevelOrderTraversal(testTree); + + // Assert + Assert.AreEqual(levelOrder, correctPath); + } + + [Test] + public static void EmptyArrayForNullRoot() + { + // Arrange + BinarySearchTree testTree = new BinarySearchTree(); + + // Act + int[] levelOrder = BreadthFirstTreeTraversal.LevelOrderTraversal(testTree); + + // Assert + Assert.IsEmpty(levelOrder); + } + + [Test] + [TestCase(new int[] {7, 9, 5})] + [TestCase(new int[] { 7, 13, 11, 15, 14, 4, 5, 16, 2 })] + public static void IncorrectLevelOrderTraversal(int[] insertion) + { + // Arrange + BinarySearchTree testTree = new BinarySearchTree(); + foreach (int data in insertion) + { + testTree.Add(data); + } + + // Act int[] levelOrder = BreadthFirstTreeTraversal.LevelOrderTraversal(testTree); // Assert - Assert.AreEqual(levelOrder, path); + Assert.AreNotEqual(levelOrder, insertion); + } + + [Test] + public static void DeepestNodeInTree() + { + // Arrange + BinarySearchTree testTree = new BinarySearchTree(); + int[] insertion = { 7, 13, 11, 15, 4, 5, 12, 2, 9 }; + foreach (int data in insertion) + { + testTree.Add(data); + } + + // Act + int deepest = BreadthFirstTreeTraversal.DeepestNode(testTree); + + // Assert + Assert.AreEqual(12, deepest); + } + + [Test] + public static void DeepestNodeOfEmptyTree() + { + // Arrange + BinarySearchTree testTree = new BinarySearchTree(); + + // Act + int? deepest = BreadthFirstTreeTraversal.DeepestNode(testTree); + + // Assert + Assert.IsNull(deepest); } } } diff --git a/Algorithms/Algorithms.csproj b/Algorithms/Algorithms.csproj index 2b92d639..07095bf8 100644 --- a/Algorithms/Algorithms.csproj +++ b/Algorithms/Algorithms.csproj @@ -29,11 +29,9 @@ - - + - - + diff --git a/Algorithms/Graph/BreadthFirstTreeTraversal.cs b/Algorithms/Graph/BreadthFirstTreeTraversal.cs index b58b4d30..04b5ef0b 100644 --- a/Algorithms/Graph/BreadthFirstTreeTraversal.cs +++ b/Algorithms/Graph/BreadthFirstTreeTraversal.cs @@ -7,6 +7,8 @@ namespace Algorithms.Graph /// /// Breadth first tree traversal traverses through a binary tree /// by iterating through each level first. + /// time complexity: O(n). + /// space complexity: O(w) where w is the max width of a binary tree. /// /// Type of key held in binary search tree. public static class BreadthFirstTreeTraversal @@ -46,5 +48,43 @@ public static TKey[] LevelOrderTraversal(BinarySearchTree tree) return levelOrder; } + + /// + /// Deepest Node return the deepest node in a binary tree. If more + /// than one node is on the deepest level, it is defined as the + /// right-most node of a binary tree. Deepest node uses breadth + /// first traversal to reach the end. + /// + /// Tree passed to find deepest node. + /// Returns the deepest node in the tree. + public static TKey? DeepestNode(BinarySearchTree tree) + { + BinarySearchTreeNode? root = tree.Root; + if (root is null) + { + return default(TKey); + } + + Queue> breadthTraversal = new Queue>(); + breadthTraversal.Enqueue(root); + TKey deepest = root.Key; + while (breadthTraversal.Count > 0) + { + BinarySearchTreeNode current = breadthTraversal.Dequeue(); + if (current.Left is not null) + { + breadthTraversal.Enqueue(current.Left); + } + + if (current.Right is not null) + { + breadthTraversal.Enqueue(current.Right); + } + + deepest = current.Key; + } + + return deepest; + } } } diff --git a/Algorithms/Graph/BreadthFirstTreeTraversal/Dijkstra/DijkstraAlgorithm.cs b/Algorithms/Graph/Dijkstra/DijkstraAlgorithm.cs similarity index 100% rename from Algorithms/Graph/BreadthFirstTreeTraversal/Dijkstra/DijkstraAlgorithm.cs rename to Algorithms/Graph/Dijkstra/DijkstraAlgorithm.cs diff --git a/Algorithms/Graph/BreadthFirstTreeTraversal/Dijkstra/DistanceModel.cs b/Algorithms/Graph/Dijkstra/DistanceModel.cs similarity index 100% rename from Algorithms/Graph/BreadthFirstTreeTraversal/Dijkstra/DistanceModel.cs rename to Algorithms/Graph/Dijkstra/DistanceModel.cs From 446edbec143439ffe3203f26f0b5321ba16b3430 Mon Sep 17 00:00:00 2001 From: Dalfonso06 Date: Thu, 27 Oct 2022 10:38:27 -0400 Subject: [PATCH 07/11] Updated Readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c57078f8..580c2949 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ find more than one implementation for the same objective but using different alg * [Minimum Spanning Tree](./Algorithms/Graph/MinimumSpanningTree) * [Prim's Algorithm (Adjacency Matrix)](./Algorithms/Graph/MinimumSpanningTree/PrimMatrix.cs) * [Kruskal's Algorithm](./Algorithms/Graph/MinimumSpanningTree/Kruskal.cs) + * [BreadthFirstTreeTraversal](./Algorithms/Graph/BreadthFirstTreeTraversal.cs) * [BreadthFirstSearch](./Algorithms/Graph/BreadthFirstSearch.cs) * [DepthFirstSearch](./Algorithms/Graph/DepthFirstSearch.cs) * [Dijkstra Shortest Path](./Algorithms/Graph/Dijkstra/DijkstraAlgorithm.cs) From 789f1d6ce8acbbdb8b70af045dc7504284206e6a Mon Sep 17 00:00:00 2001 From: Dalfonso06 Date: Thu, 27 Oct 2022 14:27:01 -0400 Subject: [PATCH 08/11] removed array type --- Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs b/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs index 515c8c71..657e0df1 100644 --- a/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs +++ b/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs @@ -40,8 +40,8 @@ public static void EmptyArrayForNullRoot() } [Test] - [TestCase(new int[] {7, 9, 5})] - [TestCase(new int[] { 7, 13, 11, 15, 14, 4, 5, 16, 2 })] + [TestCase(new [] {7, 9, 5})] + [TestCase(new [] { 7, 13, 11, 15, 14, 4, 5, 16, 2 })] public static void IncorrectLevelOrderTraversal(int[] insertion) { // Arrange From c7987c346c06fb7ea3f9580ded9c8746fbdf3c06 Mon Sep 17 00:00:00 2001 From: Daniel Alfonso <55640656+Dalfonso06@users.noreply.github.com> Date: Thu, 27 Oct 2022 18:16:33 -0400 Subject: [PATCH 09/11] Update Algorithms.csproj --- Algorithms/Algorithms.csproj | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Algorithms/Algorithms.csproj b/Algorithms/Algorithms.csproj index 07095bf8..087cfffd 100644 --- a/Algorithms/Algorithms.csproj +++ b/Algorithms/Algorithms.csproj @@ -27,11 +27,4 @@ - - - - - - - From 10ddef84435c706c05af7d034951206e6a789aa8 Mon Sep 17 00:00:00 2001 From: Daniel Alfonso <55640656+Dalfonso06@users.noreply.github.com> Date: Thu, 27 Oct 2022 18:21:13 -0400 Subject: [PATCH 10/11] Delete Algorithms.sln --- Algorithms/Algorithms.sln | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 Algorithms/Algorithms.sln diff --git a/Algorithms/Algorithms.sln b/Algorithms/Algorithms.sln deleted file mode 100644 index 5dabfb31..00000000 --- a/Algorithms/Algorithms.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 25.0.1703.5 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Algorithms", "Algorithms.csproj", "{C2FEFDE9-796C-46D7-8C98-5CC83034083D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C2FEFDE9-796C-46D7-8C98-5CC83034083D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C2FEFDE9-796C-46D7-8C98-5CC83034083D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C2FEFDE9-796C-46D7-8C98-5CC83034083D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C2FEFDE9-796C-46D7-8C98-5CC83034083D}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {AE3DA0BB-8576-4386-8DDF-90DD2DF693D1} - EndGlobalSection -EndGlobal From 3e724e9c7273c7b0bc4bf1f522ca718bffddee8a Mon Sep 17 00:00:00 2001 From: Andrii Siriak Date: Fri, 28 Oct 2022 22:52:23 +0300 Subject: [PATCH 11/11] Update Algorithms/Algorithms.csproj --- Algorithms/Algorithms.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Algorithms/Algorithms.csproj b/Algorithms/Algorithms.csproj index 087cfffd..9d3f6252 100644 --- a/Algorithms/Algorithms.csproj +++ b/Algorithms/Algorithms.csproj @@ -27,4 +27,5 @@ +