Talk:Sorting algorithms/Stooge sort: Difference between revisions
Content added Content deleted
(stooge sort LISP implamentation) |
No edit summary |
||
Line 1: | Line 1: | ||
I was wondering if any of |
I was wondering if any of you can help me. I have implemented a few sorting algorithms in other languages but doing something as simple as the stooge sort seems to be confusing me. I am going this implementation in NewLisp for practice. I like the language so far but i seem to hit a snag in this latest code: |
||
<lang NewLISP> |
<lang NewLISP> |
||
(define (stoogesort L left right)(if (> ( L left ) ( L right )) (swap ( L left) ( L right ))) |
(define (stoogesort L left right)(if (> ( L left ) ( L right )) (swap ( L left) ( L right ))) |