codinasion-archive / codinasion-dsa

An open source codebase for sharing programming solutions for Data Structures and Algorithm (DSA) problems
https://codinasion.vercel.app/dsa/
MIT License
5 stars 31 forks source link

Implement QuickSort for rust #157

Closed Pablito2020 closed 2 years ago

Pablito2020 commented 2 years ago

Why:

Closes #135

What's being changed:

Added an implementation of quicksort that uses generics and is easy to understand and read.

Check off the following:

codinasion-bot[bot] commented 2 years ago

👋🏻 Hey @Pablito2020

💖 Thanks for opening this pull request 💖

This PR will be soon reviewed by a Codinasion team member and merged shortly.

PrajwalBorkar commented 2 years ago

I'm not familiar with rust but I tried on multiple compilers same error is there. Please check if there is an error.

Pablito2020 commented 2 years ago

Sorry, I was using cargo (the default package manager and tool for compiling packages in rust) and I used the test library that comes with it. Since in this repo only the rust file is needed (not the whole cargo project) it was not compiling.

The solution that I added on commit 6d7326c3b002dd7f16d54c13724fa61131f5fe69 is to write the tests on main instead inside a different package. Now, with rustc, compiles fine.

PrajwalBorkar commented 2 years ago

Thanks for the changes. Also instead of a direct approach, you have implemented test cases so I think we will have to see what @harshraj8843 has to say about this.

harshraj8843 commented 2 years ago

Hey @Pablito2020

Could you please modify the code so that it can use test cases alongside with direct approach

Means test message will only be shown on test fail

Pablito2020 commented 2 years ago

Done! Now the program only shows the message panicking when the result isn't the expected!

PrajwalBorkar commented 2 years ago

@harshraj8843 the README.md doesn't look good when more contributors are added, the description column gets smaller. Should we modify that?

harshraj8843 commented 2 years ago

Should we modify that?

Actually we can't

the purpose of adding contributors is to show contributors on website

Screenshot from 2022-08-03 23-57-43

PrajwalBorkar commented 2 years ago

Actually, I was wondering if we can add rows in contributor section instead of one single line because the description looks weird.

Screenshot (76)

harshraj8843 commented 2 years ago

Actually, I was wondering if we can add rows in contributor section instead of one single line because the description looks weird.

Any solution for this @PrajwalBorkar ?

codinasion-bot[bot] commented 2 years ago

Thanks very much for contributing!

Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours.

Support this project by giving it a star ⭐.

Join Our Community

If you're looking for your next contribution, check out our help wanted issues :zap:

PrajwalBorkar commented 2 years ago

Actually, I was wondering if we can add rows in contributor section instead of one single line because the description looks weird.

Any solution for this @PrajwalBorkar ?

No, I don't know any. That's why I asked you.

harshraj8843 commented 2 years ago

No, I don't know any. That's why I asked you.

ok I will try ASAP 🤗