Hey!
I found these beautiful sorting algorithms: https://www.toptal.com/developers/sorting-algorithms
… and try to patch one of them.
So since I am new to v4 (first post here :), its hard to get the logic done. basically I need a condition within a loop and a counter of course to swap the spread in the right order.
in textual programming you would do it like this:
do
swapped = false
for i = 1 to indexOfLastUnsortedElement
if leftElement > rightElement
swap(leftElement, rightElement)
swapped = true; swapCounter++
while swapped
I attached my patch, but its still a long way to go :D
sorting_algo.v4p (18.9 kB)