changed not alot

This commit is contained in:
booboy 2019-05-05 13:36:56 -05:00
parent 7c95d2a96c
commit 8891f1c975
2 changed files with 6 additions and 9 deletions

View file

@ -8,4 +8,4 @@ require "algorithms"
# (If you use this, don't forget to add pry to your Gemfile!)
require "pry"
Pry.start
Pry.start

View file

@ -10,16 +10,13 @@ module Algorithms
# Step 5 Repeat until list is sorted
a.each_with_index do |value, index|
# set current element as minimum
current_element = a[index]
next_element = a[index + 1]
# set minimum to location
min = a[index]
if next_element.nil? == false && current_element > next_element
puts "Current Element: #{current_element}"
puts "Next Element: #{next_element}"
end
end
end
def insertion