Merge pull request #47 from Doppon/fix-ruby-syntax

Fix syntax of ruby code, and Unify the naming convention with snake case
This commit is contained in:
Stepfen Shawn 2020-05-14 23:00:00 +08:00 committed by GitHub
commit 26a7610238
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 101 additions and 105 deletions

View file

@ -28,7 +28,6 @@ def adjusted_down(adjusted_array, parent, limit)
adjusted_array[parent] = top adjusted_array[parent] = top
end end
#Code for testing heapsort #Code for testing heapsort
array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15].shuffle array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15].shuffle
print heap_sort(array) print heap_sort(array)

View file

@ -76,5 +76,4 @@ class SingleList
def isEmpty() def isEmpty()
return (@head==nil) return (@head==nil)
end end
end end

View file

@ -12,5 +12,3 @@ end
puts "GCD(3, 5) = " + euclidean_gcd(3, 5).to_s puts "GCD(3, 5) = " + euclidean_gcd(3, 5).to_s
puts "GCD(3, 6) = " + euclidean_gcd(3, 6).to_s puts "GCD(3, 6) = " + euclidean_gcd(3, 6).to_s
puts "GCD(6, 3) = " + euclidean_gcd(6, 3).to_s puts "GCD(6, 3) = " + euclidean_gcd(6, 3).to_s