Needs arbitrarily long tests... things like...
(let [expected (range (rand-int 200) (+ 200 (rand-int 200)) n (count expected) [a b] (map sort (split-at (rand-int n) (shuffle expected)))] (testing (format "a: %s b: %s" a b) (is (= expected (mergesorted a b)))))
I just wanted to add a simple fork that shows off what the Project Euler question was hinting towards. The iterative solution becomes slow beyond a million or so.
Ok, this should fix jetjake's code so it correctly tests. Also cleaned up formatting and spelling.
Loading collection data...
Needs arbitrarily long tests... things like...
I just wanted to add a simple fork that shows off what the Project Euler question was hinting towards. The iterative solution becomes slow beyond a million or so.
Ok, this should fix jetjake's code so it correctly tests. Also cleaned up formatting and spelling.