Skip to content

DejazmachMolla/bubble-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bubble Sort

Bubble sort is an inefficient sorting algorithm that sorts at O(n*n) time complexity. This project is simply a practice for the Ruby Programming Language.

Built With

  • Ruby

Requirements

  • The code needs to have a sorting method that sorts arrays using the Bubble Sort algorithm

Getting Started

  • Clone the project in to your computer using git clone https://github.com/DejazmachMolla/bubble-sort.git
  • cd into the bubble-sort folder
  • Open buuble_sort.rb and add the following 4 lines at the end to test the program
    • print bubble_sort([6, 5, 7, 3, 9, 0])
    • puts
    • print bubble_sort_by(["Abebe", "Kebede", "Amy", "Abe"]) { |a, b| a.length <=> b.length }
    • puts
  • run the command ruby bubble_sort.rb

Authors

👤 Dejazmach Molla

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Microverse

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages