quick sort
Posted: Tue Dec 11, 2012 7:46 am
hello every body ,
I tried to sort a list by using the quick sort algorithm
I put this code but I can not get the result
(defun qsort (L)
(if (null L)
nil
(append
(qsort (list< (first L) (rest L)) )
(cons (first L) nil)
(qsort (list>= (first L) (rest L)) )
)
)
)
would some one help me please with this code or if there is another code to do that
I tried to sort a list by using the quick sort algorithm
I put this code but I can not get the result
(defun qsort (L)
(if (null L)
nil
(append
(qsort (list< (first L) (rest L)) )
(cons (first L) nil)
(qsort (list>= (first L) (rest L)) )
)
)
)
would some one help me please with this code or if there is another code to do that