September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -7,9 +7,10 @@
|
|||
|
||||
(defn bead-sort [xs]
|
||||
(->> xs
|
||||
(map #(repeat 1 %))
|
||||
(map #(repeat % 1))
|
||||
transpose
|
||||
transpose
|
||||
(map #(reduce + %))))
|
||||
|
||||
;; This algorithm does not work if collection has zero
|
||||
(-> [5 2 4 1 3 3 9] bead-sort println)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue