Skip to content

Commit

Permalink
Did I break something?
Browse files Browse the repository at this point in the history
Merge branch 'master' of github.com:AdaGold/big-o
  • Loading branch information
sudocrystal committed Mar 2, 2017
2 parents adabdc0 + 753e16b commit 29e314e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ end
Snippet 7 - Big O:
```ruby
# this is insertion sort
(2..num.length).each do |j|
(2...num.length).each do |j|
key = num[j]
i = j - 1
while i > 0 and num[i] > key
Expand All @@ -98,7 +98,7 @@ Snippet 8 - Big O:
# this is selection sort
n.times do |i|
index_min = i
(i + 1).upto(n) do |j|
(i + 1).upto(n-1) do |j|
index_min = j if a[j] < a[index_min]
end
a[i], a[index_min] = a[index_min], a[i] if index_min != i
Expand Down

0 comments on commit 29e314e

Please sign in to comment.