diff --git a/contents/euclidean_algorithm/code/c++/euclidean.cpp b/contents/euclidean_algorithm/code/c++/euclidean.cpp index c7e6a04ba..f7b818802 100644 --- a/contents/euclidean_algorithm/code/c++/euclidean.cpp +++ b/contents/euclidean_algorithm/code/c++/euclidean.cpp @@ -1,5 +1,3 @@ -// originally contributed by James Schloss (Leios) -// restyled by Nicole Mazzuca (ubsan) #include #include #include diff --git a/contents/euclidean_algorithm/euclidean_algorithm.md b/contents/euclidean_algorithm/euclidean_algorithm.md index 780f7df90..942c19614 100644 --- a/contents/euclidean_algorithm/euclidean_algorithm.md +++ b/contents/euclidean_algorithm/euclidean_algorithm.md @@ -12,7 +12,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two {% sample lang="clj" %} [import:2-8, lang="clojure"](code/clojure/euclidean_example.clj) {% sample lang="cpp" %} -[import:20-33, lang="c_cpp"](code/c++/euclidean.cpp) +[import:18-31, lang="c_cpp"](code/c++/euclidean.cpp) {% sample lang="java" %} [import:3-16, lang="java"](code/java/EuclideanAlgo.java) {% sample lang="js" %} @@ -57,7 +57,7 @@ Modern implementations, though, often use the modulus operator (%) like so {% sample lang="clj" %} [import:9-13, lang="clojure"](code/clojure/euclidean_example.clj) {% sample lang="cpp" %} -[import:7-17, lang="c_cpp"](code/c++/euclidean.cpp) +[import:5-15, lang="c_cpp"](code/c++/euclidean.cpp) {% sample lang="java" %} [import:18-26, lang="java"](code/java/EuclideanAlgo.java) {% sample lang="js" %} diff --git a/contents/tree_traversal/code/c++/tree_example.cpp b/contents/tree_traversal/code/c++/tree_example.cpp index 748d4e243..52b356853 100644 --- a/contents/tree_traversal/code/c++/tree_example.cpp +++ b/contents/tree_traversal/code/c++/tree_example.cpp @@ -1,6 +1,3 @@ -// initially contributed by James Schloss (Leios) -// restyled by Nicole Mazzuca (ubsan) - #include #include #include diff --git a/contents/tree_traversal/tree_traversal.md b/contents/tree_traversal/tree_traversal.md index 48bb52978..5d77b75c3 100644 --- a/contents/tree_traversal/tree_traversal.md +++ b/contents/tree_traversal/tree_traversal.md @@ -6,7 +6,7 @@ Trees are naturally recursive data structures, and because of this, we cannot ac {% sample lang="jl" %} [import:3-7, lang:"julia"](code/julia/Tree.jl) {% sample lang="cpp" %} -[import:15-18, lang:"c_cpp"](code/c++/tree_example.cpp) +[import:12-15, lang:"c_cpp"](code/c++/tree_example.cpp) {% sample lang="cs" %} [import:7-11, lang:"csharp"](code/csharp/Tree.cs) {% sample lang="c" %} @@ -40,7 +40,7 @@ Because of this, the most straightforward way to traverse the tree might be recu {% sample lang="jl" %} [import:9-16, lang:"julia"](code/julia/Tree.jl) {% sample lang="cpp" %} -[import:20-27, lang:"c_cpp"](code/c++/tree_example.cpp) +[import:17-24, lang:"c_cpp"](code/c++/tree_example.cpp) {% sample lang="cs" %} [import:34-45, lang:"csharp"](code/csharp/Tree.cs) {% sample lang="c" %} @@ -83,7 +83,7 @@ Now, in this case the first element searched through is still the root of the tr {% sample lang="jl" %} [import:18-26, lang:"julia"](code/julia/Tree.jl) {% sample lang="cpp" %} -[import:29-34 lang:"c_cpp"](code/c++/tree_example.cpp) +[import:26-31, lang:"c_cpp"](code/c++/tree_example.cpp) {% sample lang="cs" %} [import:47-58, lang:"csharp"](code/csharp/Tree.cs) {% sample lang="c" %} @@ -120,7 +120,7 @@ In this case, the first node visited is at the bottom of the tree and moves up t {% sample lang="jl" %} [import:28-43, lang:"julia"](code/julia/Tree.jl) {% sample lang="cpp" %} -[import:37-55 lang:"c_cpp"](code/c++/tree_example.cpp) +[import:34-52 lang:"c_cpp"](code/c++/tree_example.cpp) {% sample lang="cs" %} [import:60-79, lang:"csharp"](code/csharp/Tree.cs) {% sample lang="c" %} @@ -167,7 +167,7 @@ In code, it looks like this: {% sample lang="jl" %} [import:45-56, lang:"julia"](code/julia/Tree.jl) {% sample lang="cpp" %} -[import:58-73, lang:"c_cpp"](code/c++/tree_example.cpp) +[import:55-70, lang:"c_cpp"](code/c++/tree_example.cpp) {% sample lang="cs" %} [import:81-94, lang:"csharp"](code/csharp/Tree.cs) {% sample lang="c" %} @@ -207,7 +207,7 @@ And this is exactly what Breadth-First Search (BFS) does! On top of that, it can {% sample lang="jl" %} [import:58-69, lang:"julia"](code/julia/Tree.jl) {% sample lang="cpp" %} -[import:76-89, lang:"c_cpp"](code/c++/tree_example.cpp) +[import:73-86, lang:"c_cpp"](code/c++/tree_example.cpp) {% sample lang="cs" %} [import:96-109, lang:"csharp"](code/csharp/Tree.cs) {% sample lang="c" %}