Skip to content

One of the simpler (but more processor-intensive) ways of sorting a group of items in an array is bubble sort, where each element is compared to the one next to it and they are swapped if the one on the left is larger than the one on the right. This continues until the array is eventually sorted.

Notifications You must be signed in to change notification settings

bertil291utn/bubble-sort-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bubble sort algorithm

Sorting algorithms are some of the earliest that you typically get exposed to in Computer Science. It may not be immediately obvious how important they are, but it shouldn’t be hard to think of some examples where your computer needs to sort some massive datasets during everyday operations.

In this project, we have written a bubble sort algorithm, split into two methods. The first one is going to sort smallest to highest and the other one is going do the same with yield and block part.

Built With

  • Ruby 2.6

Getting start

In order to start with the project:

  1. You need to have ruby environment installed. Click here for instructions
  2. Clone this repository https://github.com/bertil291utn/bubble-sort-project.git
  3. Run the algorithm file
    • In a terminal window write ruby [your_file_path]buble-sort-algorithm.rb

Authors

👤 Bertil Tandayamo

👤 Bekhzod Akhrorov

About

One of the simpler (but more processor-intensive) ways of sorting a group of items in an array is bubble sort, where each element is compared to the one next to it and they are swapped if the one on the left is larger than the one on the right. This continues until the array is eventually sorted.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages