I hereby claim:
- I am dewitt on github.
- I am dewitt (https://keybase.io/dewitt) on keybase.
- I have a public key ASAZcwELJX1Pi0Cb6cFUiT4b-VLvwGgVy3VXcKuPYKvyQgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Machine A to router: | |
dewitt@192.168.111.2% ping -c 3 192.168.111.1 | |
PING 192.168.111.1 (192.168.111.1): 56 data bytes | |
64 bytes from 192.168.111.1: icmp_seq=0 ttl=64 time=0.893 ms | |
64 bytes from 192.168.111.1: icmp_seq=1 ttl=64 time=0.768 ms | |
64 bytes from 192.168.111.1: icmp_seq=2 ttl=64 time=0.780 ms | |
Machine A to machine B: |
(fn min-path- [triangle] | |
^{:doc "79. Write a function which calculates the sum of the minimal | |
path through a triangle."} | |
;; We're going to use a dynamic programming solution, which will | |
;; reduce from the bottom of the triangle upward, replacing each row | |
;; with the sum from there on down. After the final reduction the | |
;; single remaining row will contain one element with the sum of the | |
;; min path. | |
(loop [r (reverse triangle)] | |
(if (= 1 (count r)) |