Skip to content

This is a bubble sort, example exercise. The demo is to see the use cases of bubble sort and how effective it can be with a medium amount of data.

Notifications You must be signed in to change notification settings

uzairali19/bubble-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bubble Sort

This project focuses on the bubble sort algorithm. This algorithm allows the user to input or pass an array and get that sorted in ascending order.

  • In case of integers this algorithm simply calculates which integer is bigger and swaps if need from each other to sort them. For example: 4 and 2. So, 4 would be greater than 2 and come after it. Expected result: 2, 4

  • In case of strings in an array this algorithm calculates the length of an array and then sorts them accordingly. For example: "hello" has a length of 5 and "hi" has a length of 2. So, "hello" would be greater than "hi" and come after it. Expected result: "hi","hello"

Bubble Sort

Technologies Used

  • Ruby

Authors

👤 Rockebell

👤 Uzair

Getting Started

To get a local copy of this project follow the steps below:

Setup Local

Use git clone https://github.com/uzairali19/bubble-sort.git to clone the branch directly to your machine

Setting up linter

  1. Run bundle install.
  2. Run rubocop.
  3. Fix linter errors.
  4. IMPORTANT NOTE: feel free to research auto-correct options for Rubocop if you get a flood of errors but keep in mind that correcting style errors manually will help you to make a habit of writing a clean code!
  • Navigate the project, you can open it with VScode or any other code editor of choice
  • run the code by opening up your terminal and typing ruby bubble_sort.rb
  • Happy coding!

🤝 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!

📝 License

This project is copyright protected, Feel free to contact the authors to collaborate.

About

This is a bubble sort, example exercise. The demo is to see the use cases of bubble sort and how effective it can be with a medium amount of data.

Resources

Stars

Watchers

Forks

Languages