OCaml icon indicating copy to clipboard operation
OCaml copied to clipboard

Add bubble sort

Open ShadowMitia opened this issue 5 years ago • 3 comments

This adds bubble sort to the set of algorithmsf or OCaml.

The "sorting" folder was added as the repos in other languages seem to be doing the same thing.

I've left the tests I was using in the file, I'm not sure if it's a good practice. Let me know if I need to remove it or change it.

ShadowMitia avatar Oct 03 '20 21:10 ShadowMitia

I also added a folder named Sorts so depending on who gets merged first, one of us might have to change the folder name. I'm not sure about folder naming conventions in OCaml.

I also left the tests inside the file, as I also wasn't sure. Since the repo doesn't have anything in it ATM, it's hard to tell. On some repos like TheAlgorithms/Python they often leave tests inside the file. On others like TheAlgorithms/Haskell the tests are in a separate folder and file. It depends on the language and how/if automated testing is set up.

We'll just have to wait and see. Hopefully the owner can guide us.

spamegg1 avatar Oct 04 '20 14:10 spamegg1

I don't mind either. Having a couple of tests just for documentation seems like a good idea, even if it's not proper TDD.

ShadowMitia avatar Oct 04 '20 16:10 ShadowMitia

I renamed the folder to match the already existing one.

ShadowMitia avatar Oct 11 '20 14:10 ShadowMitia