Skip to content

Commit e78892e

Browse files
thecnoNSMBButt4cak3
authored andcommitted
Bubble Sort in TI-83 Basic (#272)
1 parent fbc613f commit e78892e

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ William Boyles
4242
<br>
4343
Max Weinstein
4444
<br>
45+
Gibus Wearing Brony
46+
<br>

book.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@
112112
{
113113
"lang": "r",
114114
"name": "R"
115+
},
116+
{
117+
"lang": "ti83b",
118+
"name": "TI-83 Basic"
115119
}
116120
]
117121
}

chapters/algorithms/bubble_sort/bubble_sort.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ This means that we need to go through the vector $$\mathcal{O}(n^2)$$ times with
3636
[import:5-19, lang:"racket"](code/racket/bubbleSort.rkt)
3737
{% sample lang="swift" %}
3838
[import, lang:"swift"](code/swift/bubblesort.swift)
39+
{% sample lang="ti83b" %}
40+
[import:2-13, lang:"ti-83_basic"](code/ti83basic/BUBLSORT.txt)
3941
{% endmethod %}
4042

4143
... And that's it for the simplest bubble sort method.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
:"SUBMITTED BY GIBUS WEARING BRONY"
2+
:"L IS LENGTH OF LIST"
3+
:dim(L1)→L
4+
:For(A,1,L)
5+
:For(X,1,L-1)
6+
:If L1(X)>L1(X+1)
7+
:Then
8+
:L1(X)→Y
9+
:L1(X+1)→L1(X)
10+
:Y→L1(X+1)
11+
:End
12+
:End
13+
:End
14+
:Disp L1

0 commit comments

Comments
 (0)