CSC 151.01, Class 39: Merge Sort
Overview
- Preliminaries
- Notes and news
- Upcoming work
- Extra credit
- Notes on exam 4
- Questions
- Lab
- Debrief
News / Etc.
- I hope to have tentative project grades to you by Monday (ignoring the presentation component).
- We will discuss the form of the final Monday.
- I will have all your grades to you Monday of finals week.
Upcoming work
- Writeup for class 38 due TONIGHT at 10:30 p.m.
- Exercise 5.
- To: csc151-01-grader@grinnell.edu
- Subject: CSC 151.01 Writeup 38 (YOUR NAMES)
- Writeup for class 39 due Monday at 10:30 p.m.
- Exercises 4f, 4g, and 4h
- To: csc151-01-grader@grinnell.edu
- Subject: CSC 151.01 Writeup 39 (YOUR NAMES)
- Exam 4
- Prologue due TONIGHT
- Exam due Tuesday
- Cover sheets due Wednesday
- Epilogues due Wednesday.
- No more readings.
- No more quizzes (after today).
Extra credit (Academic/Artistic)
- CS Extras Thursday: Summer opportunities in CS.
Extra credit (Peer)
- Jazz Ensemble Concert TONIGHT at 7:30 p.m.
- Chamber Ensembles Saturday at 4:00 p.m.
Extra credit (Misc)
- Mental Health Campus Resource Fair. Friday at 4pm in JRC 209.
- Newtown movie Tuesday night.
- Whoops! If you see the movie, you can have an extra day on Exam 4.
Other good things
- Swim meet this weekend. (Friday at ???. Saturday at ???.)
- One acts this weekend.
- YGB concert Saturday at 2p.m.
- Collegium Concert Sunday at 2:00 p.m.
- Festival of trees Friday at Drake.
Notes on exam 4
I have responded to most of the prologues that I have received. Here are some common notes.
Problem 1
- You can’t just add counters or use the debugger, since many of the “expensive” procedures are built in.
- Hence, you’ll need to think about which procedures are “slow” (in that they look at the whole list).
- You may want to make a list of the procedures each calls and think about whether each is “fast” or “slow”.
Problem 2
- I’d recommend direct recursion without an accompanying “tally”.
- I’d recommend that you use
pair?rather thanlist?to check whether something is a sublist. (We did say that the input was well formed.)
Problem 3
- No changing the vector.
- No using vector append.
- No using lists.
Problem 4
- Remember that you need to use binary search.
- “use binary search” means “use the approach” not “call the procedure”
- Do not change the vector.
Problem 5
- The hard part of the problem is part e.
- You need to write about this problem even if you decide not to do it.
Other
- The most common answer to Q3: “I’m going to do problem 6 because I enjoy whatzitdos and dislike trees.”
- The second most common answer: “I don’t really like whatzitdos, but I like trees even less.”
Questions
Quiz
Lab
Please refresh when you do problem 4.
Sorry about the typos. I keep forgetting that I renamed procedures this semester.
Writeup: 4fgh RELOAD BEFORE YOU DO THESE PROBLEMS!
Debrief
How many times is merge called in (merge '(1 2 3 4) '(5 6 7 8) <=)?
How many times is merge called in (merge '(1 3 5 7) '(2 4 6 8) <=)?
Why aren’t the numbers the same?