From 4ac7b0b5bdbf1b0dc94b73ecb712cfb63b92e254 Mon Sep 17 00:00:00 2001 From: dovisutu <9709021@qq.com> Date: Wed, 12 Jun 2019 14:46:56 +0800 Subject: [PATCH 1/8] added scratch to bubble sort. --- contents/bubble_sort/bubble_sort.md | 6 + .../bubble_sort/code/scratch/bubble_sort.svg | 3091 +++++++++++++++++ 2 files changed, 3097 insertions(+) create mode 100644 contents/bubble_sort/code/scratch/bubble_sort.svg diff --git a/contents/bubble_sort/bubble_sort.md b/contents/bubble_sort/bubble_sort.md index 6781c3621..3ac4f81cb 100644 --- a/contents/bubble_sort/bubble_sort.md +++ b/contents/bubble_sort/bubble_sort.md @@ -68,6 +68,10 @@ This means that we need to go through the vector $$\mathcal{O}(n^2)$$ times with [import:2-14, lang:"emojicode"](code/emojicode/bubble_sort.emojic) {% sample lang="bash" %} [import:2-21, lang:"bash"](code/bash/bubble_sort.bash) +{% sample lang="scratch" %} +

+ +

{% endmethod %} ... And that's it for the simplest bubble sort method. @@ -141,6 +145,8 @@ Trust me, there are plenty of more complicated algorithms that do precisely the [import, lang:"emojicode"](code/emojicode/bubble_sort.emojic) {% sample lang="bash" %} [import, lang:"bash"](code/bash/bubble_sort.bash) +{% sample lang="scratch"} +The code snippet was taken from this [Scratch project](https://scratch.mit.edu/projects/316483792) {% endmethod %}