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

Quick sort is implemented using mutable array #4

Open
ashwinbhaskar opened this issue May 6, 2019 · 3 comments
Open

Quick sort is implemented using mutable array #4

ashwinbhaskar opened this issue May 6, 2019 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@ashwinbhaskar
Copy link
Owner

The quick sort implemented in the folder Scala-Way is using a mutable array. Can/Should this be done in an immutable way?

@ashwinbhaskar ashwinbhaskar added enhancement New feature or request good first issue Good for newcomers question Further information is requested labels May 6, 2019
@alex-morgun
Copy link

No, the interface should me immutable, local variables can be mutable for speed and efficiency. Not all problems are better solved pure FP

@alex-morgun
Copy link

But you can solve and make benchmark )

@ashwinbhaskar
Copy link
Owner Author

@genius-ua Agreed that not all problems are better solved with pure FP. But there are some data structures like braun trees and persistent vectors that can be used for immutability without compromising on performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants