diff --git a/chapters/decision_problems/stable_marriage/code/cs/GaleShapleyAlgorithm.cs b/chapters/decision_problems/stable_marriage/code/cs/GaleShapleyAlgorithm.cs index 018047b55..082544daf 100644 --- a/chapters/decision_problems/stable_marriage/code/cs/GaleShapleyAlgorithm.cs +++ b/chapters/decision_problems/stable_marriage/code/cs/GaleShapleyAlgorithm.cs @@ -1,7 +1,7 @@ // submitted by Julian Schacher (jspp) with great help by gustorn and Marius Becker using System.Collections.Generic; -namespace ArcaneAlgorithmArchive.ComputationalMathematics.DecisionProblems.GaleShapley +namespace StableMarriageProblem { public static class GaleShapleyAlgorithm where TFollow : Person diff --git a/chapters/decision_problems/stable_marriage/code/cs/ListExtensions.cs b/chapters/decision_problems/stable_marriage/code/cs/ListExtensions.cs index 05de81945..812a0a836 100644 --- a/chapters/decision_problems/stable_marriage/code/cs/ListExtensions.cs +++ b/chapters/decision_problems/stable_marriage/code/cs/ListExtensions.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace ArcaneAlgorithmArchive.Extensions +namespace StableMarriageProblem { public static class ListExtensions { diff --git a/chapters/decision_problems/stable_marriage/code/cs/Person.cs b/chapters/decision_problems/stable_marriage/code/cs/Person.cs index 785e605b0..8e506139b 100644 --- a/chapters/decision_problems/stable_marriage/code/cs/Person.cs +++ b/chapters/decision_problems/stable_marriage/code/cs/Person.cs @@ -1,7 +1,7 @@ // submitted by Julian Schacher (jspp) with great help by gustorn and Marius Becker using System.Collections.Generic; -namespace ArcaneAlgorithmArchive.ComputationalMathematics.DecisionProblems.GaleShapley +namespace StableMarriageProblem { public class Person where TSelf : Person diff --git a/chapters/decision_problems/stable_marriage/code/cs/Program.cs b/chapters/decision_problems/stable_marriage/code/cs/Program.cs index 63488026c..606dd6c0c 100644 --- a/chapters/decision_problems/stable_marriage/code/cs/Program.cs +++ b/chapters/decision_problems/stable_marriage/code/cs/Program.cs @@ -1,71 +1,67 @@ -// submitted by Julian Schacher (jspp) with great help by gustorn and Marius Becker -using System; -using System.Collections.Generic; -using ArcaneAlgorithmArchive.ComputationalMathematics.DecisionProblems.GaleShapley; -using ArcaneAlgorithmArchive.Extensions; - -namespace ArcaneAlgorithmArchiveCLI -{ - class MainClass - { - public static void Main(string[] args) - { - Console.WriteLine("GaleShapley"); - // Using men and women as an example. - var men = new List() - { - new Man("A"), - new Man("B"), - new Man("C"), - new Man("D"), - new Man("E") - }; - var women = new List() - { - new Woman("F"), - new Woman("G"), - new Woman("H"), - new Woman("I"), - new Woman("J"), - }; - - var random = new Random(); - - foreach (var man in men) - { - man.Choices = new List(women).Shuffle(random); - Console.WriteLine(man.Name + ":"); - foreach (var choice in man.Choices) - Console.Write(choice.Name); - Console.WriteLine(); - } - foreach (var woman in women) - { - woman.Choices = new List(men).Shuffle(random); - Console.WriteLine(woman.Name + ":"); - foreach (var choice in woman.Choices) - Console.Write(choice.Name); - Console.WriteLine(); - } - - GaleShapleyAlgorithm.RunGaleShapleyAlgorithm(women, men); - - foreach (var woman in women) - { - Console.WriteLine(woman.Name + " : " + woman?.Partner.Name); - } - Console.WriteLine(); - } - } - - // for GaleShapley - public class Man : Person - { - public Man(string name) : base(name) { } - } - - public class Woman : Person - { - public Woman(string name) : base(name) { } - } -} +// submitted by Julian Schacher (jspp) with great help by gustorn and Marius Becker +using System; +using System.Collections.Generic; + +namespace StableMarriageProblem +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("GaleShapleyAlgorithm"); + // Using men and women as an example. + var men = new List() + { + new Man("A"), + new Man("B"), + new Man("C"), + new Man("D"), + new Man("E") + }; + var women = new List() + { + new Woman("F"), + new Woman("G"), + new Woman("H"), + new Woman("I"), + new Woman("J"), + }; + + var random = new Random(); + + foreach (var man in men) + { + man.Choices = new List(women).Shuffle(random); + Console.WriteLine(man.Name + ":"); + foreach (var choice in man.Choices) + Console.Write(choice.Name); + Console.WriteLine(); + } + foreach (var woman in women) + { + woman.Choices = new List(men).Shuffle(random); + Console.WriteLine(woman.Name + ":"); + foreach (var choice in woman.Choices) + Console.Write(choice.Name); + Console.WriteLine(); + } + + GaleShapleyAlgorithm.RunGaleShapleyAlgorithm(women, men); + + foreach (var woman in women) + { + Console.WriteLine(woman.Name + " : " + woman?.Partner.Name); + } + } + } + + public class Man : Person + { + public Man(string name) : base(name) { } + } + + public class Woman : Person + { + public Woman(string name) : base(name) { } + } +} diff --git a/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithm.cs b/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithm/EuclideanAlgorithm.cs similarity index 89% rename from chapters/euclidean_algorithm/code/cs/EuclideanAlgorithm.cs rename to chapters/euclidean_algorithm/code/cs/EuclideanAlgorithm/EuclideanAlgorithm.cs index 4131f84b7..f91d98f04 100644 --- a/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithm.cs +++ b/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithm/EuclideanAlgorithm.cs @@ -1,6 +1,7 @@ -using System; +// submitted by Julian Schacher (jspp) +using System; -namespace ArcaneAlgorithmArchive.FundamentalAlgorithms.EuclideanAlgorithm +namespace EuclideanAlgorithm { public static class EuclideanAlgorithm { diff --git a/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithm/Program.cs b/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithm/Program.cs new file mode 100644 index 000000000..dd612181c --- /dev/null +++ b/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithm/Program.cs @@ -0,0 +1,18 @@ +// submitted by Julian Schacher (jspp) +using System; + +namespace EuclideanAlgorithm +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("EuclideanAlgorithm"); + int check = EuclideanAlgorithm.EuclidMod(64 * 67, 64 * 81); + int check2 = EuclideanAlgorithm.EuclidSub(128 * 12, 128 * 77); + + Console.WriteLine(check); + Console.WriteLine(check2); + } + } +} diff --git a/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithmMdAdditional.cs b/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithmMdAdditional/EuclideanAlgorithmMdAdditional.cs similarity index 59% rename from chapters/euclidean_algorithm/code/cs/EuclideanAlgorithmMdAdditional.cs rename to chapters/euclidean_algorithm/code/cs/EuclideanAlgorithmMdAdditional/EuclideanAlgorithmMdAdditional.cs index 79a449d3a..eb033e566 100644 --- a/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithmMdAdditional.cs +++ b/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithmMdAdditional/EuclideanAlgorithmMdAdditional.cs @@ -1,5 +1,5 @@ // submitted by Julian Schacher (jspp) -namespace ArcaneAlgorithmArchive.FundamentalAlgorithms.EuclideanAlgorithm +namespace EuclideanAlgorithmMdAdditional { public class EuclideanAlgorithmMdAdditional { @@ -28,15 +28,4 @@ public static int EuclidMod(int a, int b) return a; } } - class MainClass - { - public static void Main(string[] args) - { - int check = EuclideanAlgorithm.EuclidMod(64 * 67, 64 * 81); - int check2 = EuclideanAlgorithm.EuclidSub(128 * 12, 128 * 77); - - Console.WriteLine(check); - Console.WriteLine(check2); - } - } } diff --git a/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithmMdAdditional/Program.cs b/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithmMdAdditional/Program.cs new file mode 100644 index 000000000..2257445b1 --- /dev/null +++ b/chapters/euclidean_algorithm/code/cs/EuclideanAlgorithmMdAdditional/Program.cs @@ -0,0 +1,18 @@ +// submitted by Julian Schacher (jspp) +using System; + +namespace EuclideanAlgorithmMdAdditional +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("EuclideanAlgorithmMdAdditional"); + int checkMdAdditional = EuclideanAlgorithmMdAdditional.EuclidMod(64 * 67, 64 * 81); + int checkMdAdditional2 = EuclideanAlgorithmMdAdditional.EuclidSub(128 * 12, 128 * 77); + + Console.WriteLine(checkMdAdditional); + Console.WriteLine(checkMdAdditional2); + } + } +} diff --git a/chapters/euclidean_algorithm/euclidean.md b/chapters/euclidean_algorithm/euclidean.md index 76800a7eb..632730849 100644 --- a/chapters/euclidean_algorithm/euclidean.md +++ b/chapters/euclidean_algorithm/euclidean.md @@ -31,7 +31,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two {% sample lang="c" %} [import:18-33, lang="c_cpp"](code/c/euclidean_example.c) {% sample lang="cs" %} -[import:6-17, lang="csharp"](code/cs/EuclideanAlgorithmMdAdditional.cs) +[import:6-17, lang="csharp"](code/cs/EuclideanAlgorithmMdAdditional/EuclideanAlgorithmMdAdditional.cs) {% sample lang="clj" %} [import:1-7, lang="clojure"](code/clojure/euclidean_example.clj) {% sample lang="cpp" %} @@ -60,7 +60,7 @@ Modern implementations, though, often use the modulus operator (%) like so {% sample lang="c" %} [import:4-16, lang="c_cpp"](code/c/euclidean_example.c) {% sample lang="cs" %} -[import:19-29, lang="csharp"](code/cs/EuclideanAlgorithmMdAdditional.cs) +[import:19-29, lang="csharp"](code/cs/EuclideanAlgorithmMdAdditional/EuclideanAlgorithmMdAdditional.cs) {% sample lang="clj" %} [import:8-12, lang="clojure"](code/clojure/euclidean_example.clj) {% sample lang="cpp" %} @@ -93,7 +93,10 @@ The Euclidean Algorithm is truly fundamental to many other algorithms throughout [import, lang="c_cpp"](code/c/euclidean_example.c) {% sample lang="cs" %} ### C# # -[import, lang="csharp"](code/cs/EuclideanAlgorithmMdAdditional.cs) +EuclideanAlgorithm.cs +[import, lang="csharp"](code/cs/EuclideanAlgorithm/EuclideanAlgorithm.cs) +Program.cs +[import, lang="csharp"](code/cs/EuclideanAlgorithm/Program.cs) {% sample lang="clj" %} ### Clojure [import, lang="clojure"](code/clojure/euclidean_example.clj) diff --git a/chapters/sorting_searching/bogo/bogo_sort.md b/chapters/sorting_searching/bogo/bogo_sort.md index 0c2601505..670c5ff2f 100644 --- a/chapters/sorting_searching/bogo/bogo_sort.md +++ b/chapters/sorting_searching/bogo/bogo_sort.md @@ -45,7 +45,7 @@ function bogo_sort(Vector{Type} a) end ``` {% sample lang="cs" %} -[import:29-35, lang:"csharp"](code/cs/bogo.cs) +[import:9-15, lang:"csharp"](code/cs/BogoSort.cs) {% sample lang="clj" %} [import:6-10, lang:"clojure"](code/clojure/bogo.clj) {% endmethod %} diff --git a/chapters/sorting_searching/bogo/code/cs/bogo.cs b/chapters/sorting_searching/bogo/code/cs/BogoSort.cs similarity index 61% rename from chapters/sorting_searching/bogo/code/cs/bogo.cs rename to chapters/sorting_searching/bogo/code/cs/BogoSort.cs index 10718d4f4..e533a6dc0 100644 --- a/chapters/sorting_searching/bogo/code/cs/bogo.cs +++ b/chapters/sorting_searching/bogo/code/cs/BogoSort.cs @@ -2,31 +2,11 @@ using System; using System.Collections.Generic; -namespace ArcaneAlgorithmArchive.FundamentalAlgorithms.SortingSearching +namespace BogoSort { - public static class Sorting + public static class BogoSort { - public static List BubbleSort(List list) where T : IComparable - { - var length = list.Count; - - for (int i = 0; i < length; i++) - { - for (int j = 1; j < length; j++) - { - if (list[j - 1].CompareTo(list[j]) > 0) - { - var temp = list[j - 1]; - list[j - 1] = list[j]; - list[j] = temp; - } - } - } - - return list; - } - - public static List BogoSort(List list) where T : IComparable + public static List RunBogoSort(List list) where T : IComparable { while (!IsSorted(list)) list = Shuffle(list, new Random()); diff --git a/chapters/sorting_searching/bogo/code/cs/Program.cs b/chapters/sorting_searching/bogo/code/cs/Program.cs new file mode 100644 index 000000000..45b1020e9 --- /dev/null +++ b/chapters/sorting_searching/bogo/code/cs/Program.cs @@ -0,0 +1,24 @@ +// submitted by Julian Schacher (jspp) +using System; +using System.Collections.Generic; + +namespace BogoSort +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("BogoSort"); + var listBogo = new List() { 1, 2, 6, 4, 9, 54, 3, 2, 7, 15 }; + Console.Write("unsorted: "); + foreach (var number in listBogo) + Console.Write(number + " "); + Console.WriteLine(); + listBogo = BogoSort.RunBogoSort(listBogo); + Console.Write("sorted: "); + foreach (var number in listBogo) + Console.Write(number + " "); + Console.WriteLine(); + } + } +} diff --git a/chapters/sorting_searching/bubble/bubble_sort.md b/chapters/sorting_searching/bubble/bubble_sort.md index 034b779b1..bf5e7a95f 100644 --- a/chapters/sorting_searching/bubble/bubble_sort.md +++ b/chapters/sorting_searching/bubble/bubble_sort.md @@ -45,7 +45,7 @@ function bubble_sort(Vector{Type} a) end ``` {% sample lang="cs" %} -[import:9-27, lang:"csharp"](code/cs/Sorting.cs) +[import:9-27, lang:"csharp"](code/cs/BubbleSort.cs) {% endmethod %} ... And that's it for the simplest bubble sort method. diff --git a/chapters/sorting_searching/bubble/code/cs/BubbleSort.cs b/chapters/sorting_searching/bubble/code/cs/BubbleSort.cs new file mode 100644 index 000000000..c589711dd --- /dev/null +++ b/chapters/sorting_searching/bubble/code/cs/BubbleSort.cs @@ -0,0 +1,29 @@ +// submitted by Julian Schacher (jspp) +using System; +using System.Collections.Generic; + +namespace BubbleSort +{ + public static class BubbleSort + { + public static List RunBubbleSort(List list) where T : IComparable + { + var length = list.Count; + + for (int i = 0; i < length; i++) + { + for (int j = 1; j < length; j++) + { + if (list[j - 1].CompareTo(list[j]) > 0) + { + var temp = list[j - 1]; + list[j - 1] = list[j]; + list[j] = temp; + } + } + } + + return list; + } + } +} diff --git a/chapters/sorting_searching/bubble/code/cs/Program.cs b/chapters/sorting_searching/bubble/code/cs/Program.cs new file mode 100644 index 000000000..71aa7b9a2 --- /dev/null +++ b/chapters/sorting_searching/bubble/code/cs/Program.cs @@ -0,0 +1,24 @@ +// submitted by Julian Schacher (jspp) +using System; +using System.Collections.Generic; + +namespace BubbleSort +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("BubbleSort"); + var listBubble = new List() { 1, 2, 6, 4, 9, 54, 3, 2, 7, 15 }; + Console.Write("unsorted: "); + foreach (var number in listBubble) + Console.Write(number + " "); + Console.WriteLine(); + listBubble = BubbleSort.RunBubbleSort(listBubble); + Console.Write("sorted: "); + foreach (var number in listBubble) + Console.Write(number + " "); + Console.WriteLine(); + } + } +} diff --git a/chapters/sorting_searching/bubble/code/cs/Sorting.cs b/chapters/sorting_searching/bubble/code/cs/Sorting.cs deleted file mode 100644 index 10718d4f4..000000000 --- a/chapters/sorting_searching/bubble/code/cs/Sorting.cs +++ /dev/null @@ -1,71 +0,0 @@ -// submitted by Julian Schacher (jspp) -using System; -using System.Collections.Generic; - -namespace ArcaneAlgorithmArchive.FundamentalAlgorithms.SortingSearching -{ - public static class Sorting - { - public static List BubbleSort(List list) where T : IComparable - { - var length = list.Count; - - for (int i = 0; i < length; i++) - { - for (int j = 1; j < length; j++) - { - if (list[j - 1].CompareTo(list[j]) > 0) - { - var temp = list[j - 1]; - list[j - 1] = list[j]; - list[j] = temp; - } - } - } - - return list; - } - - public static List BogoSort(List list) where T : IComparable - { - while (!IsSorted(list)) - list = Shuffle(list, new Random()); - - return list; - } - - private static bool IsSorted(List list) where T : IComparable - { - var sorted = true; - - for (int i = 0; i < list.Count - 1; i++) - { - if (!(0 >= list[i].CompareTo(list[i + 1]))) - sorted = false; - } - if (!sorted) - { - sorted = true; - for (int i = 0; i < list.Count - 1; i++) - { - if (!(0 <= list[i].CompareTo(list[i + 1]))) - sorted = false; - } - } - - return sorted; - } - - private static List Shuffle(List list, Random random) - { - for (int i = list.Count - 1; i > 0; i--) - { - var j = random.Next(0, i); - var temp = list[i]; - list[i] = list[j]; - list[j] = temp; - } - return list; - } - } -} diff --git a/chapters/tree_traversal/code/cs/Tree/Program.cs b/chapters/tree_traversal/code/cs/Tree/Program.cs new file mode 100644 index 000000000..98e978c90 --- /dev/null +++ b/chapters/tree_traversal/code/cs/Tree/Program.cs @@ -0,0 +1,20 @@ +// submitted by Julian Schacher (jspp) +using System; + +namespace TreeTraversal +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("TreeTraversal"); + var tree = new Tree(3, 3); + Console.WriteLine("StartDFSRecursive:"); + tree.StartDFSRecursive(); + Console.WriteLine("DFSStack:"); + tree.DFSStack(); + Console.WriteLine("DFSQueue:"); + tree.BFSQueue(); + } + } +} diff --git a/chapters/tree_traversal/code/cs/Tree.cs b/chapters/tree_traversal/code/cs/Tree/Tree.cs similarity index 83% rename from chapters/tree_traversal/code/cs/Tree.cs rename to chapters/tree_traversal/code/cs/Tree/Tree.cs index 6521084b1..f08905608 100644 --- a/chapters/tree_traversal/code/cs/Tree.cs +++ b/chapters/tree_traversal/code/cs/Tree/Tree.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; -namespace ArcaneAlgorithmArchive.FundamentalAlgorithms.TreeTraversal +namespace TreeTraversal { public class Tree { @@ -94,18 +94,4 @@ private void DFSRecursive(Node node) } } } - - class MainClass - { - public static void Main(string[] args) - { - var tree = new Tree(3, 3); - Console.WriteLine("StartDFSRecursive:"); - tree.StartDFSRecursive(); - Console.WriteLine("DFSStack:"); - tree.DFSStack(); - Console.WriteLine("DFSQueue"); - tree.BFSQueue(); - } - } } diff --git a/chapters/tree_traversal/code/cs/TreeMdAdditional/Program.cs b/chapters/tree_traversal/code/cs/TreeMdAdditional/Program.cs new file mode 100644 index 000000000..f23c2b84e --- /dev/null +++ b/chapters/tree_traversal/code/cs/TreeMdAdditional/Program.cs @@ -0,0 +1,23 @@ +// submitted by Julian Schacher (jspp) +using System; + +namespace TreeTraversalMdAdditional +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("TreeTraversalMdAdditional"); + var treeMdAdditional = new TreeMdAdditional(3, 3); + Console.WriteLine("StartDFSRecursive"); + treeMdAdditional.StartDFSRecursive(); + Console.WriteLine("StartDFSRecursivePostorder"); + treeMdAdditional.StartDFSRecursivePostorder(); + // Console.WriteLine("StartDFSRecursiveInorder (fail)"); + // treeMdAdditional.StartDFSRecursiveInorderBinary(); + treeMdAdditional = new TreeMdAdditional(3, 2); + Console.WriteLine("StartDFSRecursiveInorder (succeed)"); + treeMdAdditional.StartDFSRecursiveInorderBinary(); + } + } +} diff --git a/chapters/tree_traversal/code/cs/TreeMdAdditional.cs b/chapters/tree_traversal/code/cs/TreeMdAdditional/TreeMdAdditional.cs similarity index 97% rename from chapters/tree_traversal/code/cs/TreeMdAdditional.cs rename to chapters/tree_traversal/code/cs/TreeMdAdditional/TreeMdAdditional.cs index b03505d35..1167b060d 100644 --- a/chapters/tree_traversal/code/cs/TreeMdAdditional.cs +++ b/chapters/tree_traversal/code/cs/TreeMdAdditional/TreeMdAdditional.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; -namespace ArcaneAlgorithmArchive.FundamentalAlgorithms.TreeTraversal +namespace TreeTraversalMdAdditional { // This class recreates Tree and inlcudes changed or new methods needed for in-text-code. // Therefor this file disregards coding standards and best practices. @@ -103,4 +103,4 @@ public void DFSRecursiveInorderBinary(Node node) } } } -} +} \ No newline at end of file diff --git a/chapters/tree_traversal/tree_traversal.md b/chapters/tree_traversal/tree_traversal.md index c1f49bbb8..5ca55f1d4 100644 --- a/chapters/tree_traversal/tree_traversal.md +++ b/chapters/tree_traversal/tree_traversal.md @@ -31,7 +31,7 @@ Trees are naturally recursive data structures, and because of this, we cannot ac {% sample lang="cpp" %} [import:1-4, lang:"c_cpp"](code/c++/tree.cpp) {% sample lang="cs" %} -[import:11-15, lang:"csharp"](code/cs/TreeMdAdditional.cs) +[import:11-15, lang:"csharp"](code/cs/TreeMdAdditional/TreeMdAdditional.cs) {% sample lang="c" %} [import:6-10, lang:"c_cpp"](code/c/Tree_example.c) {% sample lang="js" %} @@ -54,7 +54,7 @@ Because of this, the most straightforward way to traverse the tree might be recu {% sample lang="cpp" %} [import:6-13, lang:"c_cpp"](code/c++/tree.cpp) {% sample lang="cs" %} -[import:48-57, lang:"csharp"](code/cs/TreeMdAdditional.cs) +[import:48-57, lang:"csharp"](code/cs/TreeMdAdditional/TreeMdAdditional.cs) {% sample lang="c" %} [import:81-92, lang:"c_cpp"](code/c/Tree_example.c) {% sample lang="js" %} @@ -84,7 +84,7 @@ Now, in this case the first element searched through is still the root of the tr {% sample lang="cpp" %} [import:15-22, lang:"c_cpp"](code/c++/tree.cpp) {% sample lang="cs" %} -[import:75-84, lang:"csharp"](code/cs/TreeMdAdditional.cs) +[import:75-84, lang:"csharp"](code/cs/TreeMdAdditional/TreeMdAdditional.cs) {% sample lang="c" %} [import:20-29, lang:"julia"](code/julia/Tree.jl) {% sample lang="js" %} @@ -109,7 +109,7 @@ In this case, the first node visited is at the bottom of the tree and moves up t {% sample lang="cpp" %} [import:25-37, lang:"c_cpp"](code/c++/tree.cpp) {% sample lang="cs" %} -[import:86-104, lang:"csharp"](code/cs/TreeMdAdditional.cs) +[import:86-104, lang:"csharp"](code/cs/TreeMdAdditional/TreeMdAdditional.cs) {% sample lang="c" %} [import:31-47, lang:"julia"](code/julia/Tree.jl) {% sample lang="js" %} @@ -143,7 +143,7 @@ In code, it looks like this: {% sample lang="cpp" %} [import:39-52, lang:"c_cpp"](code/c++/tree.cpp) {% sample lang="cs" %} -[import:36-52, lang:"csharp"](code/cs/Tree.cs) +[import:36-52, lang:"csharp"](code/cs/Tree/Tree.cs) {% sample lang="c" %} [import:18-20, lang:"c_cpp"](code/c/Tree_example.c) [import:37-48, lang:"c_cpp"](code/c/Tree_example.c) @@ -172,7 +172,7 @@ And this is exactly what Breadth-First Search (BFS) does! On top of that, it can {% sample lang="cpp" %} [import:54-67, lang:"c_cpp"](code/c++/tree.cpp) {% sample lang="cs" %} -[import:54-70, lang:"csharp"](code/cs/Tree.cs) +[import:54-70, lang:"csharp"](code/cs/Tree/Tree.cs) {% sample lang="c" %} [import:115-135, lang:"c_cpp"](code/c/Tree_example.c) {% sample lang="js" %} @@ -197,7 +197,10 @@ And this is exactly what Breadth-First Search (BFS) does! On top of that, it can [import, lang:"c_cpp"](code/c++/tree_example.cpp) {% sample lang="cs" %} ### C# # -[import, lang:"csharp"](code/cs/Tree.cs) +Tree.cs +[import, lang:"csharp"](code/cs/Tree/Tree.cs) +Program.cs +[import, lang:"csharp"](code/cs/Tree/Program.cs) {% sample lang="c" %} ### C [import, lang:"c_cpp"](code/c/Tree_example.c)