Jump to content

Talk:Sorting algorithms/Stooge sort: Difference between revisions

no edit summary
(stooge sort LISP implamentation)
 
No edit summary
Line 1:
I was wondering if any of youryou can help me. I have implamentedimplemented 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 implamentationimplementation in NewLisp for practice. I like the language so far but i seem to hit a snag in this latest code:
<lang NewLISP>
(define (stoogesort L left right)(if (> ( L left ) ( L right )) (swap ( L left) ( L right )))
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.