100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

CPSC 110 GRADED PROBLEM SET 10 2022/2023 RATED 100%

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
13-10-2023
Written in
2023/2024

CPSC 110 GRADED PROBLEM SET 10 2022/2023 RATED 100% ;; DO NOT PUT ANY PERSONALLY IDENTIFYING INFORMATION IN THIS FILE. ;; Problem Set 10 (THIS IS A ONE-PHASE PEER GRADED PROBLEM) ; PROBLEM 1: ; ; Recall the prefix spelling trees from Midterm 2. ; ; . ; ; ; ; Design a function called count-odds that takes a prefix spelling tree ; and determines how many odd-length words are contained in it. ; Use a lost-context accumulator to design this function NO MARKS WILL BE GIVEN ; for a solution that does not use a lost-context accumulator. ; ; We have provided the data definition for prefix trees below. (define-struct pt (l f? subs)) ;; PrefixTree is (make-pt String Boolean (listof PrefixTree)) ;; interp. a prefix spelling tree. The sequence of letters up to and including ;; a given node are a legal word if f? is true, not legal otherwise. (define PT0 (make-pt "K" true empty)) (define PTT (make-pt "t" false (list (make-pt "o" true (list (make-pt "o" true (list (make-pt "k" true empty))) (make-pt "t" true empty) (make-pt "l" false (list (make-pt "l" true empty))) (make-pt "u" false (list (make-pt "c" false (list (make-pt "h" true empty))))))) (make-pt "i" false (list (make-pt "n" true empty)))))) (define LOPT0 (list (make-pt "o" true empty) (make-pt "t" true empty)))

Show more Read less









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
October 13, 2023
Number of pages
6
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
wlucy2851 Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
109
Member since
2 year
Number of followers
92
Documents
506
Last sold
1 month ago

3.4

11 reviews

5
3
4
2
3
4
2
0
1
2

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions