Skip to content

Instantly share code, notes, and snippets.

@jneira
Created May 25, 2011 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jneira/992016 to your computer and use it in GitHub Desktop.
Save jneira/992016 to your computer and use it in GitHub Desktop.
(defn triangle-min-path [tr]
(first (reduce
(fn [p n]
(let [mins (map min p (rest p))]
(map + mins n)))
(reverse tr))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment