Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CPSC110 Pset6 solution

Rating
-
Sold
-
Pages
4
Grade
A
Uploaded on
16-11-2025
Written in
2025/2026

This is the correct and the latest solution for pset 6.

Content preview

;​; DO NOT PUT ANYTHING PERSONALLY IDENTIFYING BEYOND YOUR CWL IN THIS​
​FILE.​
​;; YOUR CWLs WILL BE SUFFICIENT TO IDENTIFY YOU.​
​;;​
​(require spd/tags)​

​(@assignment psets/pset-06); Do not edit or remove this tag​


​(@problem 1)​

(​ @htdd Course ListOfCourse)​
​(define-struct course (number credits dependents))​
​;; Course is (make-course Natural Natural ListOfCourse)​
​;; interp. a course with a course number,​
​;; the number of credits the course is worth, and a​
​;; list of courses that have this course as a pre-requisite​

;​; ListOfCourse is one of:​
​;; - empty​
​;; - (cons Course ListOfCourse)​
​;; interp. a list of courses​

(​ define LOC0 empty)​
​(define C322 (make-course 322 3 LOC0))​
​(define C320 (make-course 320 3 LOC0))​
​(define C319 (make-course 319 4 LOC0))​
​(define C317 (make-course 317 3 LOC0))​
​(define C314 (make-course 314 3 LOC0))​
​(define C313 (make-course 313 3 LOC0))​
​(define C312 (make-course 312 3 LOC0))​
​(define C311 (make-course 311 3 LOC0))​
​(define LOC1 (list C319))​
​(define C310 (make-course 310 4 LOC1))​
​(define C304 (make-course 304 3 LOC0))​
​(define C302 (make-course 302 3 LOC0))​
​(define C303 (make-course 303 3 LOC0))​
​(define LOC2 (list C304 C313 C314 C317 C320 C322))​
​(define C221 (make-course 221 4 LOC2))​
​(define LOC3 (list C313 C317))​
​(define C213 (make-course 213 4 LOC3))​
​(define LOC4 (list C213 C221 C310 C311 C312))​
​(define C210 (make-course 210 4 LOC4))​
​(define C203 (make-course 203 3 LOC0))​
​(define C189 (make-course 189 1 LOC0))​
​(define LOC5 (list C189 C203 C210 C302 C303))​
​(define C110 (make-course 110 4 LOC5))​
​(define C100 (make-course 100 3 LOC0))​

Document information

Uploaded on
November 16, 2025
Number of pages
4
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
CA$13.96
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
06shyun1211

Get to know the seller

Seller avatar
06shyun1211 University of British Columbia
View profile
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
4 months
Number of followers
0
Documents
8
Last sold
3 weeks ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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