Skip to content

Sort an array using Ruby. Start with the first two elements and sort them in ascending order. (Compare the element to check which one is greater).

License

Notifications You must be signed in to change notification settings

petudeveloper/Bubble-Sort

Repository files navigation

Bubble Sort

This is the first project that welcomes us into the Ruby Section of the Microverse Remote Software Development Curriculum.

This is a quick extract that helps explains the underlying concepts of bubble sort

Bubble Sort Algorithm: Steps on how it works:

In an unsorted array of elements, start with the first two elements and sort them in ascending order. (Compare the element to check which one is greater).

  • Compare the second and third element to check which one is greater, and sort them in ascending order.
  • Compare the third and fourth element to check which one is greater, and sort them in ascending order.
  • Compare the fourth and fifth element to check which one is greater, and sort them in ascending order.
  • Repeat steps 1–5 until no more swaps are required.

Simple right? Below is a simple animated illustration:

screenshot

Built With

  • Ruby

Live Demo

Live Demo Link

Getting Started

To get a local copy up and running use this command git clone https://github.com/petumazo/Bubble-Sort.git

Authors

👤 David Alvarez

👤 Daniel Samuel

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Project originally taken from The Odin Project
  • Project inspired by Microverse Program

📝 License

This project is MIT licensed.

About

Sort an array using Ruby. Start with the first two elements and sort them in ascending order. (Compare the element to check which one is greater).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages