摘要: Perfect NumbersDifficulty:MediumTopics:A number is "perfect" if the sum of its divisors equal the number itself. 6 is a perfect number because 1+2+3=6... 阅读全文
posted @ 2014-12-01 20:32 TomAndRainy 阅读(110) 评论(0) 推荐(0)
摘要: Triangle Minimal PathDifficulty:HardTopics:graph-theoryWrite a function which calculates the sum of the minimal path through a triangle. The triangle ... 阅读全文
posted @ 2014-12-01 20:31 TomAndRainy 阅读(160) 评论(0) 推荐(0)
摘要: Reimplement TrampolineDifficulty:MediumTopics:core-functionsReimplement the function described in"Intro to Trampoline".(= (letfn [(triple [x] #(sub-tw... 阅读全文
posted @ 2014-11-27 20:56 TomAndRainy 阅读(147) 评论(0) 推荐(0)
摘要: IntelliJ IDEA的终端JRE问题折腾了一下午,最终是被坑,怪自己没有经验,jianbing同学一看就帮我发现了猫腻,记录一下,作为前车之鉴。IntelliJ IDEA的terminal的JRE和机器本身JRE的关系,我今天编译完,运行一段代码,一直出错,说 amd 64bit。dll不能在... 阅读全文
posted @ 2014-11-27 20:31 TomAndRainy 阅读(307) 评论(0) 推荐(0)
摘要: Anagram FinderDifficulty:MediumTopics:Write a function which finds all the anagrams in a vector of words. A word x is an anagram of word y if all the ... 阅读全文
posted @ 2014-11-27 20:30 TomAndRainy 阅读(146) 评论(0) 推荐(0)
摘要: Euler's Totient FunctionDifficulty:MediumTopics:Two numbers are coprime if their greatest common divisor equals 1. Euler's totient function f(x) is de... 阅读全文
posted @ 2014-11-27 19:21 TomAndRainy 阅读(217) 评论(0) 推荐(0)
摘要: Difficulty:HardTopics:gameAtic-tac-toeboard is represented by a two dimensional vector. X is represented by :x, O is represented by :o, and empty is r... 阅读全文
posted @ 2014-11-26 19:22 TomAndRainy 阅读(185) 评论(0) 推荐(0)
摘要: Difficulty:MediumTopics:sortingWrite a function that splits a sentence up into a sorted list of words. Capitalization should not affect sort order and... 阅读全文
posted @ 2014-11-26 19:20 TomAndRainy 阅读(130) 评论(0) 推荐(0)
摘要: Difficulty:MediumTopics:core-functionsWrite a function which takes a function f and a variable number of maps. Your function should return a map that ... 阅读全文
posted @ 2014-11-26 19:19 TomAndRainy 阅读(168) 评论(0) 推荐(0)
摘要: Difficulty:MediumTopics:primesWrite a function which returns the first x number of prime numbers.(= (__ 2) [2 3])(= (__ 5) [2 3 5 7 11])(= (last (__ 1... 阅读全文
posted @ 2014-11-26 19:18 TomAndRainy 阅读(115) 评论(0) 推荐(0)