Created
November 28, 2017 19:28
-
-
Save ishankhare07/ffc0d1dacfcec3c4a057aca22b4c9fe0 to your computer and use it in GitHub Desktop.
famous quicksort in erlang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(qsort). | |
-export([qsort/1]). | |
qsort([]) -> []; | |
qsort([H|T]) -> | |
qsort([X || X <- T, X < H]) ++ [H] ++ qsort([X || X <- T, X > H]). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
running it: