Skip to content

Commit 50a1157

Browse files
committed
Add text form scratchblock; use scratch 3
1 parent f8aaa63 commit 50a1157

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
-3.15 KB
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
define BubbleSort
2+
set [it1 v] to (1)
3+
set [it2 v] to (1)
4+
repeat (length of [List v])
5+
repeat ((length of [List v]) - (1))
6+
If <(item ((it2)+(1)) of [List v]) <(item (it2) of [List v])> then
7+
set [tmp v] to (item (it2) of [List v])
8+
replace item (it2) of [List v] with (item ((it2)+(1)) of [List v]
9+
replace item ((it2)+(1)) of [List v] with (tmp)
10+
end
11+
change [it2 v] by (1)
12+
end
13+
set [it2 v] to (1)
14+
change [it1 v] by (1)
15+
end

0 commit comments

Comments
 (0)