From 0d697f26e7714663772425619a6f39d270926e53 Mon Sep 17 00:00:00 2001 From: binarydinosaur252 Date: Tue, 21 Aug 2018 21:00:20 -0400 Subject: [PATCH 1/5] implemented bubble sort in nim --- contents/bubble_sort/bubble_sort.md | 4 ++++ contents/bubble_sort/code/nim/bubble_sort.nim | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 contents/bubble_sort/code/nim/bubble_sort.nim diff --git a/contents/bubble_sort/bubble_sort.md b/contents/bubble_sort/bubble_sort.md index fbdd88060..3354d1e9e 100644 --- a/contents/bubble_sort/bubble_sort.md +++ b/contents/bubble_sort/bubble_sort.md @@ -46,6 +46,8 @@ This means that we need to go through the vector $$\mathcal{O}(n^2)$$ times with [import:3-15, lang:"php"](code/php/bubble_sort.php) {% sample lang="lisp" %} [import:3-28, lang:"lisp"](code/lisp/bubble_sort.lisp) +{% sample lang="nim" %} +[import:6-10, lang:"nim"](code/nim/bubble_sort.nim) {% endmethod %} ... And that's it for the simplest bubble sort method. @@ -97,6 +99,8 @@ Trust me, there are plenty of more complicated algorithms that do precisely the [import, lang:"php"](code/php/bubble_sort.php) {% sample lang="lisp" %} [import, lang:"lisp"](code/lisp/bubble_sort.lisp) +{% sample lang="nim" %} +[import, lang:"nim"](code/nim/bubble_sort.nim) {% endmethod %}