Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aleksandarivezic/bubble-sort
https://github.com/aleksandarivezic/bubble-sort
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/aleksandarivezic/bubble-sort
- Owner: AleksandarIvezic
- Created: 2021-04-20T08:03:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-20T15:54:06.000Z (over 3 years ago)
- Last Synced: 2024-12-07T18:11:58.671Z (22 days ago)
- Language: Ruby
- Size: 183 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![](https://img.shields.io/badge/Microverse-blueviolet)
# Advanced Building Blocks - Bubble Sort
[Collaborative project]
>In this project, we implemented the bubble sort algorithm. The assignment is focused on the use of yield and passing a block to a method.>The next part of the assignment is similar to the previous method, but it accepts code blocks using yield.
## Built With
- Ruby
## Pre-request
Ruby installed.
## How to use instructions
- Bubble Sort [bubble_sort.rb] — buble_sort method accept one argument(array)
To test code you can provide following line at the end of the code```ruby
p bubble_sort([4, 3, 78, 2, 0, 2])
```
and then run from terminal
```terminal
foo:$ ruby bubble_sort.rb
```- In this case, it receives a block of code and uses yield in method to execute the descending sort
To test the code, you can provide the following line at the end of the code.```ruby
sorted_by_array = bubble_sort_by(%w[hi hello hey]) do |left, right|
left.length - right.length
endp sorted_by_array
```
and then run from terminal
```terminal
foo:$ ruby bubble_sort_by.rb
```## Getting Started
To get a local copy up and running follow these simple example steps.
1. Go to https://github.com/ShinobiWarior/Bubble-sort
2. Click on the code button and copy the HTTPS/ SSH URL.
3. On terminal, type `git clone` command followed by pasting HTTPS/ SSH URL to clone this repository on your local machine.
4. Run `git checkout -b your-branch-name`. Make your contributions
5. Push your branch up to your forked repository
6. Open a Pull Request with a detailed description of the development branch of the original project for a review## Authors
👤 **Aleksandar Ivezic**
- GitHub: [Aleksandar Ivezic](https://github.com/ShinobiWarior)
- Twitter: [@Aivezic](https://twitter.com/Aivezic)
- LinkedIn: [Aleksandar Ivezic](https://www.linkedin.com/in/aleksandar-ivezi%C4%87-1a6b0391/)👤 **Moises Hernandez**
- GitHub: [@githubhandle](https://github.com/Mhdez221993)
- Twitter: [@twitterhandle](https://twitter.com/MoisesH42060050s)
- LinkedIn: [LinkedIn](https://www.linkedin.com/in/moises-hernandez-9bbb17145/)## 🤝 Contributing
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://github.com/ShinobiWarior/Bubble-sort/issues).