From c08043d63036c03bb0f6fc2b51dd189e9a4bf933 Mon Sep 17 00:00:00 2001 From: Dimitri Belopopsky Date: Mon, 29 Nov 2021 03:19:03 +0100 Subject: [PATCH 1/2] Fix import of coconut in flood_fill.md --- contents/flood_fill/flood_fill.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contents/flood_fill/flood_fill.md b/contents/flood_fill/flood_fill.md index 4c7e5936e..02dd5a294 100644 --- a/contents/flood_fill/flood_fill.md +++ b/contents/flood_fill/flood_fill.md @@ -95,7 +95,7 @@ In code, this might look like this: {% sample lang="py" %} [import:10-25, lang="python"](code/python/flood_fill.py) {% sample lang="coco" %} -[import:15-19, lang="coconut"](code/coconut/flood_fill.coco) +[import:15-20, lang="coconut"](code/coconut/flood_fill.coco) {% endmethod %} @@ -117,7 +117,7 @@ In code, it might look like this: {% sample lang="py" %} [import:55-63, lang="python"](code/python/flood_fill.py) {% sample lang="coco" %} -[import:54-63, lang:"coconut"](code/coconut/flood_fill.coco) +[import:52-61, lang:"coconut"](code/coconut/flood_fill.coco) {% endmethod %} The above code continues recursing through available neighbors as long as neighbors exist, and this should work so long as we are adding the correct set of neighbors. From 045a61d869820b362d775ab9bd126237251640c9 Mon Sep 17 00:00:00 2001 From: Dimitri Belopopsky Date: Wed, 1 Dec 2021 15:38:38 +0100 Subject: [PATCH 2/2] Fix path for BFS for coconut import in flood_fill.md --- contents/flood_fill/flood_fill.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/flood_fill/flood_fill.md b/contents/flood_fill/flood_fill.md index 02dd5a294..e5345f453 100644 --- a/contents/flood_fill/flood_fill.md +++ b/contents/flood_fill/flood_fill.md @@ -179,7 +179,7 @@ The code would look something like this: {% sample lang="py" %} [import:38-53, lang="python"](code/python/flood_fill.py) {% sample lang="coco" %} -[import:37-51, lang:"coconut"](code/coconut/flood_fill.coco) +[import:36-49, lang:"coconut"](code/coconut/flood_fill.coco) {% endmethod %} Now, there is a small trick in this code that must be considered to make sure it runs optimally.