Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename QuickSortInPlace to TrueQuickSort or something similar. #105

Closed
farkaskid opened this issue Jul 22, 2018 · 1 comment
Closed

Rename QuickSortInPlace to TrueQuickSort or something similar. #105

farkaskid opened this issue Jul 22, 2018 · 1 comment

Comments

@farkaskid
Copy link

It should be mentioned that QuickSortInPlace is the actual quick sort. Other implementation that allows using extra space is like quick sort but not the strictly the actual algorithm.

I've seen this at several places. For example the following implementation of quicksort in Haskell

quicksort :: (Ord a) => [a] -> [a]  
quicksort [] = []  
quicksort (x:xs) =   
    let smallerSorted = quicksort [a | a <- xs, a <= x]  
        biggerSorted = quicksort [a | a <- xs, a > x]  
    in  smallerSorted ++ [x] ++ biggerSorted  

It is shown as a quicksort implementation but in reality it is not.
A lot of newbies will get a wrong idea about the quicksort this way who are only learning algos this way.
It should at least be mentioned in the ReadMe that the one with the in-place is the real one.

trekhleb added a commit that referenced this issue Jul 24, 2018
@trekhleb
Copy link
Owner

Thank you for your issue @farkaskid
I've updated READMEs and mentioned your point there.

shoredata pushed a commit to shoredata/javascript-algorithms that referenced this issue Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants