Skip to content

dsbfelipe/odin-bubble-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation



This project is part of The Odin Project's Ruby course. In this assignment, I implemented the bubble sort algorithm to sort an array of numbers. The project was relatively easier compared to the others so far, as I had already implemented the bubble sort in both C and JavaScript a few times.

πŸ“ Project Objective

The goal was to create a method called bubble_sort that sorts an array by comparing each element to the one next to it, swapping them if necessary. The process repeats until the array is sorted.

πŸ”§ Features

  • Accepts an array of integers as input.

  • Sorts the array in ascending order using the bubble sort algorithm.

  • Repeatedly swaps adjacent elements if they are out of order.

  • Returns the sorted array after all iterations.

πŸ“– Learnings

  • Nested Loops: Improved understanding of using nested loops for iterative comparison of adjacent elements.

  • Swapping Values: Refined my approach for swapping values in an array without using built-in methods like sort.

  • Algorithmic Thinking: Strengthened my grasp of how to translate an algorithm from one language (like C or JavaScript) to another (Ruby), maintaining logic consistency.

πŸ’» Technologies Used

  • Ruby for implementing the bubble sort algorithm and handling array manipulation.

πŸ’‘ Acknowledgments

  • The Odin Project: For providing the project outline and guidance.

About

Bubble Sort project from the Odin Project Ruby Course

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages