;; big-Theta of n, where n is the size of the input sentence (define (member? wd sent) (if (empty? sent) #t (or (equal? wd (first sent)) (member? wd (butfirst sent))))) ;; big-Theta of (nm), where n is the size of the first input sentence ;; and m is the size of the second input sentence (define (repeat? sent1 sent2) (cond ((empty? sent1) #f) ((member? (first sent1) sent2) #t) (else (repeat? (bf sent1) sent2))))