; Requirements: ; 0 <= r ; 0 <= c <= r ; Ouput: ; cth element of rth row of pascal's triangle ; ie: r choose c (define (pascal r c) (cond ((= c 0) 1) ((= c r) 1) ((= r 0) 1) (else (+ (pascal (- r 1) (- c 1)) (pascal (- r 1) c))))) ; O(r) memory ; O(r choose c) time ; Dynamic programming ; O(rc) memory ; O(rc) time