SnowArraySort 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,8 +2,8 @@ module SnowArraySort
|
|
2
2
|
class MASort
|
3
3
|
include SnowArraySort
|
4
4
|
|
5
|
-
def mergesort(array)
|
6
|
-
def merge(left_sorted, right_sorted)
|
5
|
+
def self.mergesort(array)
|
6
|
+
def self.merge(left_sorted, right_sorted)
|
7
7
|
res = []
|
8
8
|
l = 0
|
9
9
|
r = 0
|
@@ -23,7 +23,7 @@ module SnowArraySort
|
|
23
23
|
return res
|
24
24
|
end
|
25
25
|
|
26
|
-
def mergesort_iter(array_sliced)
|
26
|
+
def self.mergesort_iter(array_sliced)
|
27
27
|
return array_sliced if array_sliced.length <= 1
|
28
28
|
|
29
29
|
mid = array_sliced.length/2 - 1
|