Skip to content

Add bubble_sort.py to bubble_sort.md #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions chapters/sorting_searching/bubble/bubble_sort.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ In this way, we sweep through the array $$n$$ times for each element and continu
This means that we need to go through the vector $$\mathcal{O}(n^2)$$ times with code similar to the following:

{% method %}
{% sample lang="jl" %}
[import:1-10, lang:"julia"](code/julia/bubble.jl)
{% sample lang="cs" %}
[import:9-27, lang:"csharp"](code/cs/BubbleSort.cs)
{% sample lang="c" %}
[import:3-21, lang:"c_cpp"](code/c/bubble_sort.c)
{% sample lang="js" %}
[import:1-11, lang:"javascript"](code/js/bubble.js)
{% sample lang="hs" %}
[import, lang:"haskell"](code/haskell/bubbleSort.hs)
{% sample lang="cs" %}
[import:9-27, lang:"csharp"](code/cs/BubbleSort.cs)
{% sample lang="cpp" %}
[import, lang:"c_cpp"](code/c++/bubblesort.cpp)
{% sample lang="d" %}
[import, lang:"d"](code/d/bubble_sort.d)
{% sample lang="hs" %}
[import, lang:"haskell"](code/haskell/bubbleSort.hs)
{% sample lang="js" %}
[import:1-11, lang:"javascript"](code/js/bubble.js)
{% sample lang="jl" %}
[import:1-10, lang:"julia"](code/julia/bubble.jl)
{% sample lang="py" %}
[import:1-23, lang:"python"](code/python/bubble.py)
{% endmethod %}

... And that's it for the simplest bubble sort method.
Expand Down