🏠
Working from home
- São Paulo, Brazil
Pinned Loading
-
SICP Exercise 3.18
SICP Exercise 3.18 1; Tortoise and Hare algorithm2; This works by having two pointers crossing the list3; One moves fast (hare), the other moves slowly (tortoise)4; If at a given moment in time both matches it means that there's a cycle5; This algorithm runs with constant space -
SICP Exercise 3.18
SICP Exercise 3.18 1; Keep a list of the visited nodes2; While crossing the list, check if the current node is on the visited list of nodes3; If true, it's circular45; Using eq?, we can implement a useful procedure called memq. -
Implementing functions to calculate ...
Implementing functions to calculate the largest prime factor of a given number 1(defn primes-iter
2[primes candidate limit]
3(letfn [(is-prime?
4[]
5(->> primes -
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.



