This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cs330_f2016:racketlists [2019/09/09 16:05] morse |
cs330_f2016:racketlists [2019/09/09 16:09] morse |
||
---|---|---|---|
Line 83: | Line 83: | ||
For example, ''(average (list 1 2 3 4))'' returns 5/2. | For example, ''(average (list 1 2 3 4))'' returns 5/2. | ||
+ | |||
+ | Hint: you are **not** required to compute the average in a single pass. Can you break it into simpler operations? | ||
=== convertFC === | === convertFC === | ||
Line 102: | Line 104: | ||
Hint: try using a helper function. | Hint: try using a helper function. | ||
- | Hint 2: consider trying to make the decision about whether to drop a particular item from the list after recursively calling eliminate-larger on the rest after that one -- it's easier. | + | Hint 2: consider trying to make the decision about whether to drop a particular item from the list **after** recursively calling eliminate-larger on the rest after that one -- it's easier. |
=== get-nth === | === get-nth === |