Skip to content

Commit 202a264

Browse files
Butt4cak3leios
authored andcommitted
Renamed some language code dirs for consistency (#224)
* Renamed code/js/ directories to code/javascript/ * Renamed code/hs/ directories to code/haskell/ * Renamed code/R/ directories to code/r/ * Updated a reference to a JS file in a code file * Renamed code/cs/ directories to code/csharp/
1 parent cf0fae7 commit 202a264

File tree

30 files changed

+31
-31
lines changed

30 files changed

+31
-31
lines changed
File renamed without changes.

chapters/FFT/cooley_tukey.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ In the end, the code looks like:
121121
{% sample lang="cpp" %}
122122
[import:27-57, lang:"c_cpp"](code/c++/fft.cpp)
123123
{% sample lang="hs" %}
124-
[import:6-19, lang:"haskell"](code/hs/fft.hs)
124+
[import:6-19, lang:"haskell"](code/haskell/fft.hs)
125125
{% sample lang="py" %}
126126
[import:5-16, lang:"python"](code/python/fft.py)
127127
{% sample lang="scratch" %}
@@ -229,7 +229,7 @@ Note: I implemented this in Julia because the code seems more straightforward in
229229
[import, lang:"c_cpp"](code/c++/fft.cpp)
230230
{% sample lang="hs" %}
231231
### Haskell
232-
[import, lang:"haskell"](code/hs/fft.hs)
232+
[import, lang:"haskell"](code/haskell/fft.hs)
233233
{% sample lang="py" %}
234234
### Python
235235
[import, lang:"python"](code/python/fft.py)

chapters/computational_geometry/gift_wrapping/jarvis_march/jarvis_march.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ Since this algorithm, there have been many other algorithms that have advanced t
2626
{% sample lang="cs" %}
2727
### C# #
2828
JarvisMarch.cs
29-
[import, lang="csharp"](code/cs/JarvisMarch.cs)
29+
[import, lang="csharp"](code/csharp/JarvisMarch.cs)
3030
Program.cs
31-
[import, lang="csharp"](code/cs/Program.cs)
31+
[import, lang="csharp"](code/csharp/Program.cs)
3232
{% sample lang="jl" %}
3333
### Julia
3434
[import, lang:"julia"](code/julia/jarvis.jl)

chapters/data_compression/huffman/huffman.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ Whether you use a stack or straight-up recursion also depends on the language, b
6969
{% sample lang="cs" %}
7070
### C# #
7171
HuffmanCoding.cs
72-
[import, lang:"csharp"](code/cs/HuffmanCoding.cs)
72+
[import, lang:"csharp"](code/csharp/HuffmanCoding.cs)
7373
Program.cs
74-
[import, lang:"csharp"](code/cs/Program.cs)
74+
[import, lang:"csharp"](code/csharp/Program.cs)
7575
{% sample lang="cpp" %}
7676
### C++
7777
[import, lang:"c_cpp"](code/c++/huffman.cpp)

chapters/decision_problems/stable_marriage/stable_marriage.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ I am incredibly interested to see what you guys do and how you implement the alg
4040
{% sample lang="cs" %}
4141
### C# #
4242
GaleShapleyAlgorithm.cs
43-
[import, lang:"csharp"](code/cs/GaleShapleyAlgorithm.cs)
43+
[import, lang:"csharp"](code/csharp/GaleShapleyAlgorithm.cs)
4444
Person.cs
45-
[import, lang:"csharp"](code/cs/Person.cs)
45+
[import, lang:"csharp"](code/csharp/Person.cs)
4646
Program.cs
47-
[import, lang:"csharp"](code/cs/Program.cs)
47+
[import, lang:"csharp"](code/csharp/Program.cs)
4848
ListExtensions.cs
49-
[import, lang:"csharp"](code/cs/ListExtensions.cs)
49+
[import, lang:"csharp"](code/csharp/ListExtensions.cs)
5050
{% endmethod %}
5151

5252
<script>

chapters/euclidean_algorithm/euclidean.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two
88
{% sample lang="c" %}
99
[import:17-30, lang="c_cpp"](code/c/euclidean_example.c)
1010
{% sample lang="cs" %}
11-
[import:8-23, lang="csharp"](code/cs/EuclideanAlgorithm.cs)
11+
[import:8-23, lang="csharp"](code/csharp/EuclideanAlgorithm.cs)
1212
{% sample lang="clj" %}
1313
[import:2-8, lang="clojure"](code/clojure/euclidean_example.clj)
1414
{% sample lang="cpp" %}
@@ -41,7 +41,7 @@ Modern implementations, though, often use the modulus operator (%) like so
4141
{% sample lang="c" %}
4242
[import:4-16, lang="c_cpp"](code/c/euclidean_example.c)
4343
{% sample lang="cs" %}
44-
[import:25-39, lang="csharp"](code/cs/EuclideanAlgorithm.cs)
44+
[import:25-39, lang="csharp"](code/csharp/EuclideanAlgorithm.cs)
4545
{% sample lang="clj" %}
4646
[import:9-13, lang="clojure"](code/clojure/euclidean_example.clj)
4747
{% sample lang="cpp" %}
@@ -79,9 +79,9 @@ The Euclidean Algorithm is truly fundamental to many other algorithms throughout
7979
{% sample lang="cs" %}
8080
### C# #
8181
EuclideanAlgorithm.cs
82-
[import, lang="csharp"](code/cs/EuclideanAlgorithm.cs)
82+
[import, lang="csharp"](code/csharp/EuclideanAlgorithm.cs)
8383
Program.cs
84-
[import, lang="csharp"](code/cs/Program.cs)
84+
[import, lang="csharp"](code/csharp/Program.cs)
8585
{% sample lang="clj" %}
8686
### Clojure
8787
[import 2-20, lang="clojure"](code/clojure/euclidean_example.clj)

chapters/monte_carlo/monte_carlo.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ each point is tested to see whether it's in the circle or not:
4444
{% sample lang="c" %}
4545
[import:7-9, lang:"c_cpp"](code/c/monte_carlo.c)
4646
{% sample lang="js" %}
47-
[import:2-6, lang:"javascript"](code/js/monte_carlo.js)
47+
[import:2-6, lang:"javascript"](code/javascript/monte_carlo.js)
4848
{% sample lang="hs" %}
4949
[import:7-7, lang:"haskell"](code/haskell/monteCarlo.hs)
5050
{% sample lang="rs" %}
@@ -54,7 +54,7 @@ each point is tested to see whether it's in the circle or not:
5454
{% sample lang="go" %}
5555
[import:12-14, lang:"golang"](code/go/monteCarlo.go)
5656
{% sample lang="r" %}
57-
[import:2-6, lang:"r"](code/R/monte_carlo.R)
57+
[import:2-6, lang:"r"](code/r/monte_carlo.R)
5858
{% sample lang="java" %}
5959
[import:13-15, lang:"java"](code/java/MonteCarlo.java)
6060
{% sample lang="swift" %}
@@ -101,7 +101,7 @@ Feel free to submit your version via pull request, and thanks for reading!
101101
[import, lang:"c_cpp"](code/c/monte_carlo.c)
102102
{% sample lang="js" %}
103103
### Javascript
104-
[import, lang:"javascript"](code/js/monte_carlo.js)
104+
[import, lang:"javascript"](code/javascript/monte_carlo.js)
105105
{% sample lang="hs" %}
106106
### Haskell
107107
[import, lang:"haskell"](code/haskell/monteCarlo.hs)
@@ -116,7 +116,7 @@ Feel free to submit your version via pull request, and thanks for reading!
116116
[import, lang:"golang"](code/go/monteCarlo.go)
117117
{%sample lang="r" %}
118118
### R
119-
[import, lang:"r"](code/R/monte_carlo.R)
119+
[import, lang:"r"](code/r/monte_carlo.R)
120120
{% sample lang="java" %}
121121
### Java
122122
[import, lang:"java"](code/java/MonteCarlo.java)

chapters/sorting_searching/bogo/bogo_sort.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ In code, it looks something like this:
1616
{% sample lang="jl" %}
1717
[import:1-14, lang:"julia"](code/julia/bogo.jl)
1818
{% sample lang="cs" %}
19-
[import:9-15, lang:"csharp"](code/cs/BogoSort.cs)
19+
[import:9-15, lang:"csharp"](code/csharp/BogoSort.cs)
2020
{% sample lang="clj" %}
2121
[import:2-11, lang:"clojure"](code/clojure/bogo.clj)
2222
{% sample lang="c" %}
2323
[import:4-29, lang:"c_cpp"](code/c/bogo_sort.c)
2424
{% sample lang="java" %}
2525
[import:2-17, lang:"java"](code/java/bogo.java)
2626
{% sample lang="js" %}
27-
[import:1-16, lang:"javascript"](code/js/bogo.js)
27+
[import:1-16, lang:"javascript"](code/javascript/bogo.js)
2828
{% sample lang="py" %}
2929
[import:4-12, lang:"python"](code/python/bogo.py)
3030
{% sample lang="hs" %}

chapters/sorting_searching/bogo/code/js/bogo.js renamed to chapters/sorting_searching/bogo/code/javascript/bogo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function isSorted(arr) {
88
return true;
99
}
1010

11-
// The shuffle() function can be found in code/js/bogo.js
11+
// The shuffle() function can be found in code/javascript/bogo.js
1212
function bogoSort(arr) {
1313
while (!isSorted(arr)) {
1414
shuffle(arr);

chapters/sorting_searching/bubble/bubble_sort.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ This means that we need to go through the vector $$\mathcal{O}(n^2)$$ times with
1111
{% sample lang="jl" %}
1212
[import:1-10, lang:"julia"](code/julia/bubble.jl)
1313
{% sample lang="cs" %}
14-
[import:9-27, lang:"csharp"](code/cs/BubbleSort.cs)
14+
[import:9-27, lang:"csharp"](code/csharp/BubbleSort.cs)
1515
{% sample lang="c" %}
1616
[import:4-22, lang:"c_cpp"](code/c/bubble_sort.c)
1717
{% sample lang="java" %}
1818
[import:2-12, lang:"java"](code/java/bubble.java)
1919
{% sample lang="js" %}
20-
[import:1-11, lang:"javascript"](code/js/bubble.js)
20+
[import:1-11, lang:"javascript"](code/javascript/bubble.js)
2121
{% sample lang="py" %}
2222
[import:4-9, lang:"python"](code/python/bubblesort.py)
2323
{% sample lang="m" %}

chapters/tree_traversal/tree_traversal.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Trees are naturally recursive data structures, and because of this, we cannot ac
88
{% sample lang="cpp" %}
99
[import:15-18, lang:"c_cpp"](code/c++/tree_example.cpp)
1010
{% sample lang="cs" %}
11-
[import:7-11, lang:"csharp"](code/cs/Tree.cs)
11+
[import:7-11, lang:"csharp"](code/csharp/Tree.cs)
1212
{% sample lang="c" %}
1313
[import:7-11, lang:"c_cpp"](code/c/tree_traversal.c)
1414
{% sample lang="java" %}
@@ -35,7 +35,7 @@ Because of this, the most straightforward way to traverse the tree might be recu
3535
{% sample lang="cpp" %}
3636
[import:20-27, lang:"c_cpp"](code/c++/tree_example.cpp)
3737
{% sample lang="cs" %}
38-
[import:34-45, lang:"csharp"](code/cs/Tree.cs)
38+
[import:34-45, lang:"csharp"](code/csharp/Tree.cs)
3939
{% sample lang="c" %}
4040
[import:37-45, lang:"c_cpp"](code/c/tree_traversal.c)
4141
{% sample lang="java" %}
@@ -71,7 +71,7 @@ Now, in this case the first element searched through is still the root of the tr
7171
This has not been implemented in your chosen language, so here is the Julia code
7272
[import:18-26, lang:"julia"](code/julia/Tree.jl)
7373
{% sample lang="cs" %}
74-
[import:47-58, lang:"csharp"](code/cs/Tree.cs)
74+
[import:47-58, lang:"csharp"](code/csharp/Tree.cs)
7575
{% sample lang="c" %}
7676
[import:47-53, lang:"c_cpp"](code/c/tree_traversal.c)
7777
{% sample lang="java" %}
@@ -103,7 +103,7 @@ In this case, the first node visited is at the bottom of the tree and moves up t
103103
This has not been implemented in your chosen language, so here is the Julia code
104104
[import:28-43, lang:"julia"](code/julia/Tree.jl)
105105
{% sample lang="cs" %}
106-
[import:60-79, lang:"csharp"](code/cs/Tree.cs)
106+
[import:60-79, lang:"csharp"](code/csharp/Tree.cs)
107107
{% sample lang="c" %}
108108
[import:55-73, lang:"c_cpp"](code/c/tree_traversal.c)
109109
{% sample lang="java" %}
@@ -144,7 +144,7 @@ In code, it looks like this:
144144
{% sample lang="cpp" %}
145145
[import:29-45, lang:"c_cpp"](code/c++/tree_example.cpp)
146146
{% sample lang="cs" %}
147-
[import:81-94, lang:"csharp"](code/cs/Tree.cs)
147+
[import:81-94, lang:"csharp"](code/csharp/Tree.cs)
148148
{% sample lang="c" %}
149149
[import:75-93, lang:"c_cpp"](code/c/tree_traversal.c)
150150
{% sample lang="java" %}
@@ -177,7 +177,7 @@ And this is exactly what Breadth-First Search (BFS) does! On top of that, it can
177177
{% sample lang="cpp" %}
178178
[import:47-61, lang:"c_cpp"](code/c++/tree_example.cpp)
179179
{% sample lang="cs" %}
180-
[import:96-109, lang:"csharp"](code/cs/Tree.cs)
180+
[import:96-109, lang:"csharp"](code/csharp/Tree.cs)
181181
{% sample lang="c" %}
182182
[import:95-113, lang:"c_cpp"](code/c/tree_traversal.c)
183183
{% sample lang="java" %}
@@ -206,9 +206,9 @@ This has not been implemented in your chosen language, so here is the Julia code
206206
{% sample lang="cs" %}
207207
### C# #
208208
Tree.cs
209-
[import, lang:"csharp"](code/cs/Tree.cs)
209+
[import, lang:"csharp"](code/csharp/Tree.cs)
210210
Program.cs
211-
[import, lang:"csharp"](code/cs/Program.cs)
211+
[import, lang:"csharp"](code/csharp/Program.cs)
212212
{% sample lang="c" %}
213213
### C
214214
utility.h

0 commit comments

Comments
 (0)