Code Review
Compare your solutions
(define (square x) (* x x))
(define (sum_of_squares first second)
(+ (square first) (square second)))
(define (solution a b c)
(sum_of_squares (max a b c)
(max (min a b) (min a c) (min b c))))
(define (square x) (* x x))
(define (sum_of_squares first second)
(+ (square first) (square second)))
(define (solution a b c)
(sum_of_squares (max a b c)
(max (min a b) (min a c) (min b c))))
(define (square x)
(* x x))
(define (sum-square x y)
(+ (square x) (square y)))
(define (solution x y z)
(cond ((and (> x z) (> y z)) (sum-square x y))
((and (> y x) (> z x)) (sum-square y z))
(else (sum-square x z))))
(define (square x) (* x x))
(define (sum_of_squares first second)
(+ (square first) (square second)))
(define (solution a b c)
(sum_of_squares (max a b c)
(max (min a b) (min a c) (min b c))))
(define (square x) (* x x))
(define (sum_of_squares first second)
(+ (square first) (square second)))
(define (solution a b c)
(sum_of_squares (max a b c)
(max (min a b) (min a c) (min b c))))
(define (square x)
(* x x))
(define (sum-square x y)
(+ (square x) (square y)))
(define (solution x y z)
(cond ((and (> x z) (> y z)) (sum-square x y))
((and (> y x) (> z x)) (sum-square y z))
(else (sum-square x z))))