This is my Clojure solution to Chapter 1, Exercise 26:
(ns sicp.ch1.ex26)
;; By replacing the call to square with an explicit multiplication,
;; we've changed the resultant process from a linear recursive
;; process to a tree recursion which changes the running-time from
;; O(log n) to O(log 2^n) = O(n).
(ns sicp.ch1.ex26)
;; By replacing the call to square with an explicit multiplication,
;; we've changed the resultant process from a linear recursive
;; process to a tree recursion which changes the running-time from
;; O(log n) to O(log 2^n) = O(n).
No comments:
Post a Comment