Skip to content

AbdumurodovaZulfizar/bubble-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bobble Sort

This project is entry project for ruby, which has been built to sort arrays with the bubble sort methodology. And it consists of two types of methods, first - sorts the array with ruby method, second - sorts the array with the method which has yield and block.

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.

There's also an entry on Bubble Sort on Wikipedia that's worth taking a look at.

Built With

Ruby

Getting Started

To get a local copy up and running follow these simple steps.

  • git clone https://github.com/AbdumurodovaZulfizar/bubble-sort.git
  • cd bubble-sort
  • Open this repository on your device

Authors

👩🏻‍💼 Zulfizar Abdumurodova

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

📝 License

Copyright 2021 Zulfizar Abdumurodova

  • MIT license for this project.

About

A method that sorts arrays

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages