@@ -38,6 +38,8 @@ As a note, a `node` struct is not necessary in javascript, so this is an example
38
38
[ import:24-27, lang:"asm-x64"] ( code/asm-x64/tree_traversal.s )
39
39
{% sample lang="emojic" %}
40
40
[ import:1-3, lang:"emojicode"] ( code/emojicode/tree_traversal.emojic )
41
+ {% sample lang="lisp" %}
42
+ [ import:3-3, lang:"lisp"] ( code/clisp/tree-traversal.lisp )
41
43
{% sample lang="m" %}
42
44
[ import:6-6, lang:"matlab"] ( code/matlab/tree.m )
43
45
{% endmethod %}
@@ -79,6 +81,8 @@ Because of this, the most straightforward way to traverse the tree might be recu
79
81
[ import:290-314, lang:"asm-x64"] ( code/asm-x64/tree_traversal.s )
80
82
{% sample lang="emojic" %}
81
83
[ import:27-34, lang:"emojicode"] ( code/emojicode/tree_traversal.emojic )
84
+ {% sample lang="lisp" %}
85
+ [ import:5-10, lang:"lisp"] ( code/clisp/tree-traversal.lisp )
82
86
{% sample lang="m" %}
83
87
[ import:31-45, lang:"matlab"] ( code/matlab/tree.m )
84
88
{% endmethod %}
@@ -129,6 +133,8 @@ Now, in this case the first element searched through is still the root of the tr
129
133
[ import:316-344, lang:"asm-x64"] ( code/asm-x64/tree_traversal.s )
130
134
{% sample lang="emojic" %}
131
135
[ import:36-43, lang:"emojicode"] ( code/emojicode/tree_traversal.emojic )
136
+ {% sample lang="lisp" %}
137
+ [ import:12-17, lang:"lisp"] ( code/clisp/tree-traversal.lisp )
132
138
{% sample lang="m" %}
133
139
[ import:47-62, lang:"matlab"] ( code/matlab/tree.m )
134
140
{% endmethod %}
@@ -174,13 +180,15 @@ In this case, the first node visited is at the bottom of the tree and moves up t
174
180
[ import:346-396, lang:"asm-x64"] ( code/asm-x64/tree_traversal.s )
175
181
{% sample lang="emojic" %}
176
182
[ import:45-62, lang:"emojicode"] ( code/emojicode/tree_traversal.emojic )
183
+ {% sample lang="lisp" %}
184
+ [ import:19-32, lang:"lisp"] ( code/clisp/tree-traversal.lisp )
177
185
{% sample lang="m" %}
178
186
[ import:64-82, lang:"matlab"] ( code/matlab/tree.m )
179
187
{% endmethod %}
180
188
181
- <p >
182
- <img class="center" src="res/DFS_in.png" width="500" />
183
- </p >
189
+ <p >
190
+ <img class="center" src="res/DFS_in.png" width="500" />
191
+ </p >
184
192
185
193
The order here seems to be some mix of the other 2 methods and works through the binary tree from left to right.
186
194
@@ -228,6 +236,8 @@ In code, it looks like this:
228
236
[ import:398-445, lang:"asm-x64"] ( code/asm-x64/tree_traversal.s )
229
237
{% sample lang="emojic" %}
230
238
[ import:64-79, lang:"emojicode"] ( code/emojicode/tree_traversal.emojic )
239
+ {% sample lang="lisp" %}
240
+ [ import:34-43, lang:"lisp"] ( code/clisp/tree-traversal.lisp )
231
241
{% sample lang="m" %}
232
242
[ import:84-106, lang:"matlab"] ( code/matlab/tree.m )
233
243
{% endmethod %}
@@ -275,6 +285,8 @@ And this is exactly what Breadth-First Search (BFS) does! On top of that, it can
275
285
[ import:447-498, lang:"asm-x64"] ( code/asm-x64/tree_traversal.s )
276
286
{% sample lang="emojic" %}
277
287
[ import:81-96, lang:"emojicode"] ( code/emojicode/tree_traversal.emojic )
288
+ {% sample lang="lisp" %}
289
+ [ import:45-56, lang:"lisp"] ( code/clisp/tree-traversal.lisp )
278
290
{% sample lang="m" %}
279
291
[ import:108-129, lang:"matlab"] ( code/matlab/tree.m )
280
292
{% endmethod %}
@@ -335,6 +347,8 @@ The code snippets were taken from this [Scratch project](https://scratch.mit.edu
335
347
[ import, lang:"asm-x64"] ( code/asm-x64/tree_traversal.s )
336
348
{% sample lang="emojic" %}
337
349
[ import, lang:"emojicode"] ( code/emojicode/tree_traversal.emojic )
350
+ {% sample lang="lisp" %}
351
+ [ import, lang:"lisp"] ( code/clisp/tree-traversal.lisp )
338
352
{% sample lang="m" %}
339
353
[ import, lang:"matlab"] ( code/matlab/tree.m )
340
354
{% endmethod %}
0 commit comments