8000 GitHub - sfraser/DatacenterCooling: Clojure solution for Quora's "Datacenter Cooling" challenge at http://www.quora.com/challenges
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sfraser/DatacenterCooling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Experimenting with clojure to see how it handles solving the Datacenter Cooling challenge here:
    http://www.quora.com/challenges

Right now I am focusing on the logic, so the program itself does not meet all the input/output
requirements of the challenge.

The current version is brute-force - it just tries to find all the routes with no intelligence. It
is also easy to try parrallelizing the program, but right now on smaller datasets with 2 cores (my
laptop) it is faster to brute force with one thread.

How to Run

At the top of the file set these vars:

; Dimensions of the grid - "width" and "height":
(def w 4)
(def h 3)

; The datacenter map as a sequence flowing left to right, and top to bottom.
; For example here is the first challenge from the quora website:
(def datacenterinput '(2 0 0 0 0 0 0 0 0 0 3 1))

Then call -main:

(-main)

About

Clojure solution for Quora's "Datacenter Cooling" challenge at http://www.quora.com/challenges

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0