DEV Community

Discussion on: What is Quicksort

Collapse
 
lyfolos profile image
Muhammed H. Alkan • Edited

I just tried to make it more readable for beginners. I can do oneliner in Python and OCaml too.

qs = lambda a: [] if not a else qs([n for n in a if n < a[0]]) + [a[0]] + qs([n for n in a if n > a[0]])

It's still readable, IMO.

So?