From a1503a917a654c7a123dad8aeee82a84da63dad2 Mon Sep 17 00:00:00 2001 From: NIFR91 Date: Tue, 31 Jul 2018 21:12:26 -0500 Subject: [PATCH 1/3] Added Bubble Sort in Crystal --- CONTRIBUTORS.md | 2 ++ contents/bubble_sort/bubble_sort.md | 4 ++++ contents/bubble_sort/code/crystal/bubble.cr | 22 +++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100755 contents/bubble_sort/code/crystal/bubble.cr diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6b04065d8..3c30913fd 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -49,3 +49,5 @@ Max Weinstein Gibus Wearing Brony
Arun Sahadeo +
+NIFR91 diff --git a/contents/bubble_sort/bubble_sort.md b/contents/bubble_sort/bubble_sort.md index 2a08b628c..d67e7c4ff 100644 --- a/contents/bubble_sort/bubble_sort.md +++ b/contents/bubble_sort/bubble_sort.md @@ -40,6 +40,8 @@ This means that we need to go through the vector $$\mathcal{O}(n^2)$$ times with [import:2-13, lang:"ti-83_basic"](code/ti83basic/BUBLSORT.txt) {% sample lang="ruby" %} [import:3-13, lang:"ruby"](code/ruby/bubble.rb) +{% sample lang="crystal" %} +[import:3-13, lang:"crystal"](code/crystal/bubble.cr) {% endmethod %} ... And that's it for the simplest bubble sort method. @@ -85,6 +87,8 @@ Program.cs [import, lang:"ti-83_basic"](code/ti83basic/BUBLSORT.txt) {% sample lang="ruby" %} [import, lang:ruby"](code/ruby/bubble.rb) +{% sample lang="crystal" %} +[import, lang:"crystal"](code/crystal/bubble.cr) {% endmethod %}