摘要:
Ex2.1-4Problem description:Input: two arrays lhs and rhs which store two n-bit binary numbers respectivelyOutput: one array that stores an n+1-bit bin... 阅读全文
摘要:
全部代码参见Github:https://github.com/pxjw/MITx-6.00.1-2-Problem-Set/tree/master/6.00.1x/proSet3HANGMAN PART 1: IS THE WORD GUESSED?Please read the Hangman ... 阅读全文
摘要:
使用Scheme的对数迭代法:#lang racket;;N是偶数:b^n = (b^(n/2))^2(define (square x) (* x x));定义乘积函数(define (fast-expt b n);筛选 (expt-iter b n 1))(define (expt-iter ... 阅读全文