Skip to content

nguyenjessev/bubble-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Bubble Sort

This is a Ruby implementation of bubble sort

Parameters

(Array of numbers)

Returns

Array of numbers sorted ascending

Problems

Given an array of numbers, use a bubble sorting algorithm to sort them ascending

What I used

Iteration over an array, helper variables to determine when the array was sorted, and logic to improve performance by restricting the length of the array to iterate over

What I learned

A basic bubble sorting algorithm and how to optimize it (due to the observation that the last N items in an array are always sorted after N passes through the array)

About

Ruby implementation of bubble sort

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages